Enable a procedural language in Postgres

If you wish to add any language support to your PostgresSQL database use the createlang command from your terminal. For eg: To add PLPGSQL support –

su

su postgres

createlang plpgsql -d template1

where -d signifies name of the database. The other command line arguments that the createlang command takes are –

langname

Specifies the name of the backend programming language
to be defined. createlang will prompt for langname if it is
not specified on the command line.
-d, -dbname dbname
Specifies which database the language
should be added.
-l, -list
Shows a list of already installed languages in the target
database (which must be specified).

createlang also accepts the following command line arguments for connection
parameters:

-h, -host host
Specifies the hostname of the machine on
which the postmaster is running.
-p, -port port
Specifies the Internet TCP/IP port or local
Unix domain socket file extension on which the postmaster is listening
for connections.
-U, -username username
Username to connect as.
-W, -password
Force password prompt.
Advertisements

About synapse
Programming, motorcycles and photography. Want to do more, but only have time for so much!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: