| From: | Ed Loehr <ELOEHR(at)austin(dot)rr(dot)com> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | How to enable plpgsql functions (and triggers) |
| Date: | 1999-11-11 21:38:44 |
| Message-ID: | 382B3764.3AAB7382@austin.rr.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
I wanted to use PL/pgsql to write some functions for use with
triggers, and thought others might benefit from a concise description
of how to enable this without having to scour the postgresql
documentation. This was with a default install of pgsql v6.5.2 on
RH6.0.
CREATE FUNCTION plpgsql_call_handler () RETURNS OPAQUE AS
'/usr/local/pgsql/lib/plpgsql.so' LANGUAGE 'C';
CREATE TRUSTED PROCEDURAL LANGUAGE 'plpgsql'
HANDLER plpgsql_call_handler
LANCOMPILER 'PL/pgSQL';
Ref: http://www.postgresql.org/docs/postgres/xplang.htm#XPLANG-TITLE
The trigger example at
http://www.postgresql.org/docs/postgres/xplang19094.htm does not work
without this (there's also a missing single quote after "AS").
Cheers.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ed Loehr | 1999-11-11 22:17:45 | How to enable PL/pgsql for functions/triggers |
| Previous Message | Marcin Inkielman | 1999-11-11 19:32:09 | Re: [GENERAL] Postgres concurrency : urgent |