Re: [HACKERS] What about CREATE OR REPLACE FUNCTION? - Mailing list pgadmin-hackers

From Jean-Michel POURE
Subject Re: [HACKERS] What about CREATE OR REPLACE FUNCTION?
Date
Msg-id 4.2.0.58.20011008173356.02590bc0@pop.freesurf.fr
Whole thread Raw
In response to Re: [HACKERS] What about CREATE OR REPLACE FUNCTION?  (Jean-Michel POURE <jm.poure@freesurf.fr>)
List pgadmin-hackers
At 00:43 09/10/01 +1000, you wrote:
>Could it not just be a feature of pgadmin to allow users to enable
>plpgsql? Enabling the language is, after all, just SQL.
>
>As for having it by default, this takes some level of control out of the
>hands of the administrator. What if you do not want to allow your users to
>create plpgsql functions?
>
>Gavin

Hello Gavin,

Enabling plpgsql language is just SQL, agreed.

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';

But you can never be sure that /usr/local/pgsql/lib/plpgsql.so
is the right path. Maybe a built-in plpgsql_call_handler function would
suffice.

Cheers,
Jean-Michel POURE


pgadmin-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] What about CREATE OR REPLACE FUNC TION?
Next
From: Dave Page
Date:
Subject: pgAdmin II v1.1.59 Preview Release