Installing PLpgSQL

   

Installing PL/pgSQL

PostgreSQL can support a variety of procedural languages. Before you can use a procedural language, you have to install it into the database. Fortunately, this is a simple procedure.

The createlang shell script installs PL/pgSQL into a database. If you install PL/pgSQL in the template1 database, it will automatically be installed in all databases created from that template. The format for createlang is

 createlang plpgsql  database-name  

To install PL/pgSQL in the movies database, execute the following command:

 $ createlang plpgsql movies 

Notice that this is a command-line utility, not a psql command.

   


PostgreSQL
PostgreSQL (2nd Edition)
ISBN: 0672327562
EAN: 2147483647
Year: 2005
Pages: 220
Authors: Korry Douglas

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