Installation of PL/pgSQL 1) Type 'make' to build the shared plpgsql object. 2) Type 'make install' to install the shared object in the PostgreSQL library directory. 3) Declare the PL/pgSQL procedural language in your database by running the createlang script: createlang plpgsql DBNAME If you declare the language in the template1 database, any subsequently created database will have PL/pgSQL support installed automatically.