0

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?

1
  • @ChrisS // You're totally right. I forgot to choose an answer for all my questions...bad bad...!!
    – Moon
    Oct 27, 2011 at 21:50

1 Answer 1

2

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.

1
  • Note, the above answer mostly applies to pre-9.0 versions of postgres; as of 9.0 plpgsql is installed by default.
    – xzilla
    Oct 29, 2011 at 14:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .