Enabling a Database with PL/pgSQLWhen you create a new database, you have to enable PL/pgSQL manually. Type the following lines in your UNIX shell: [hs@athlon hs]$ createdb yourdb CREATE DATABASE [hs@athlon hs]$ createlang plpgsql yourdb On some UNIX systems, (for example, RedHat 7.0), the environment variables PGDATA and PGLIB have to be set to make createlang work properly (set PGLIB to the directory containing the file called plpgsql.o and PGDATA to the directory containing the PostgreSQL databases). If the two commands finished without errors, your database now supports PL/pgSQL. |