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