-- The following lines installs PL/pgSQL on the PostgreSQL server

drop procedural language 'PLpgSQL';
drop function plpgsql_call_handler();

-- select lanplcallfoid from pg_language where lanname='plpgsql';
-- psql -At -c "select probin from pg_proc where proname='plpgsql_call_handler'"

create function plpgsql_call_handler() returns language_handler as
  '/usr/local/pgsql/lib/plpgsql.so'
language 'C';

create trusted procedural language 'PLpgSQL'
  handler plpgsql_call_handler
  lancompiler 'PL/pgSQL';

--EOF
