Thread: unrecognized language 'plpgsql'

unrecognized language 'plpgsql'

From
Markus Wagner
Date:
Hi,

when creating a function I get the error message 'unrecognized
language'.
What's this? I need a powerful language which can retrieve many things
(username, tables, attributes, etc.).
Isn't plpgsql the best choice? Why this message and where can I find
more documentation on plpgsql?

Thank you,

Markus


Re: unrecognized language 'plpgsql'

From
"Richard Huxton"
Date:
From: "Markus Wagner" <wagner@imsd.uni-mainz.de>

> Hi,
>
> when creating a function I get the error message 'unrecognized
> language'.
> What's this? I need a powerful language which can retrieve many things
> (username, tables, attributes, etc.).
> Isn't plpgsql the best choice? Why this message and where can I find
> more documentation on plpgsql?

Try "man createlang" - you need to turn a language on for each database that
needs it.

The docs for plpgsql have been much updated in the 7.1 docs and there are
some useful examples in Roberto Mello's cookbook at
techdocs.postgresql.org - there is a host of other stuff there too including
some examples of trigger usage in my "postgresql notes".

- Richard Huxton



Re: unrecognized language 'plpgsql'

From
"Josh Berkus"
Date:
Mr. Wagner,

> when creating a function I get the error message 'unrecognized
> language'.
> What's this? I need a powerful language which can retrieve many
> things
> (username, tables, attributes, etc.).
> Isn't plpgsql the best choice? Why this message and where can I find
> more documentation on plpgsql?

Yes.  Roberto Mello has excellent extended docs for PL/pgSQL:
http://www.brasileiro.net/postgres/plpgsql/

Your issue is that PL/pgSQL has not yet been created in the database you
are using as an available function language.  Go to the regular online
user docs and look up "CREATE LANGUAGE" for instructions on how to do
this.

-Josh Berkus


______AGLIO DATABASE SOLUTIONS___________________________                                      Josh Berkus Complete
informationtechnology      josh@agliodbs.com  and data management solutions       (415) 565-7293 for law firms, small
businesses       fax 621-2533   and non-profit organizations.      San Francisco