I have two postgres database servers. Let's name that A and B respectively.
When I create a database in A, I don't have to run the following command to install a language.
createlang -U postgres plpgsql {database name}
Somehow...I have to run the above command in B.
How do I make it so that server B installs 'plpgsql' language when I create a database?
Install the language onto the template databases. The default template-database is named
template1
, and is the one copied when you create new databases. Any modifications you make to this database, should appear on new databases.Check out http://www.postgresql.org/docs/8.4/interactive/manage-ag-templatedbs.html for more information.