Forum OpenACS Q&A: createlang pgsql message

Collapse
Posted by Matthew Terenzio on
Anyone ever get this:

PL/pgSQL has not been created in your database. Execute the following command while logged in as a PostgreSQL "superuser":
createlang plpgsql your_database_name

when you absolutely know its been created?

Collapse
Posted by Matthew Terenzio on
OR JUST THINK YOU DO! Nevermind.
Collapse
Posted by Giampiero Granatella on
You can add pgsql in postgres' template, so every DB'll have this language added.
To do this simply type as the DBA user:

<blockquote>createlang plpgsql template1
</blockquote>

To check if you have pgsql language type

<blockquote> createlang -l template1
</blockquote>

Procedural languages
  Name  | Trusted?
---------+----------
plpgsql | t
(1 row)

If you want to see if have pgsql in a specific Database (DBNAME), type

<blockquote> createlang -l DBNAME
</blockquote>

Bye
Giampiero