PostgreSQL for Mac and language support – PLPGSQL

         ·      · · ·

Seems sometimes the PostgresqlforMac package doesn’t have support out of the box for PLPGSQL or other stored procedure languages and you can’t simply change to the correct user to upgrade it instead call the createlang command like this:

[cc lang=“bash”]

/Library/PostgreSQL8/bin/createlang -l DATABASE -U USER;


Obviously changing DATABASE to your database and USER to your user. This will list all the languages enabled for that database.

To add PL/PGSQL, try this:

[cc lang=“bash”]

/Library/PostgreSQL8/bin/createlang plpgsql DATABASE -U USER;


Now you are free to create your functions.

If you want to save the change for each database that is created, apply the change to template1 database.

comments powered by Disqus