createlang [ connection options ] [ langname [ dbname ] ] createlang [ connection options ] --list|-l [ dbname ]
Use this parameter to name the programming language you are defining. If a name is not specified, createlang will prompt for one.
Use this parameter to specify the name of the database the new language will be added to.
Pass this parameter to list all currently installed languages in the specified database.
The createlang command also provides the following arguments for connection parameters:
Use this parameter to provide the hostname of the machine postmaster is running on.
Use this parameter to provide the TCP/IP port or socket file that postmaster is listening on.
Use this parameter to specify the username to connect as.
Pass this parameter to have createlang prompt for a password before completing.
Use createlang as an alternate way of adding new programming langage definitions into a database. As of the current release of PostgreSQL (7.1), createlang accepts the following languages:
The advantage of using createlang over SQL commands for adding languages is that it performs a number of checks that those commands do not explicitly check. Additionally, it can be called from the command line and is generally easier to use.
The following example demonstrates how to install the PL/pgSQL language into the booktown database.
$ createlang plpgsql booktown