Enabling a Database with PLpgSQL


Enabling a Database with PL/pgSQL

When 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.



PostgreSQL Developer's Handbook2001
PostgreSQL Developer's Handbook2001
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 125

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net