Обсуждение: Unrecognized language plpgsql when CREATE FUNCTION?!

Поиск
Список
Период
Сортировка

Unrecognized language plpgsql when CREATE FUNCTION?!

От
Raymond Chui
Дата:
I have install all latest PostgreSQL 7.0.3 packages except python
into my Redhat Linux 6.2

When I CREATE FUNCTION fname() RETURN OPAQUE AS '
DECLARE
    ...;
BEGIN
    ....;
END;
' LANGUAGE 'plpgsql';

I got Unrecognized language plpgsql, it only recognized sql, C, internal
and
created_procedure_name.
Well, in Postgres documents has examples for Language plpgsql.
Please tell me what do I missing, what other packages I need to install?

Thank you very much!

--
Why we want to teach our babies to talk and walk,
then later we tell them "sit down!", "be quiet!" ?

Democracy is not a better way for a solution,
it is just another way to spread the blames.

--Raymond


Вложения

Re: Unrecognized language plpgsql when CREATE FUNCTION?!

От
Stephan Szabo
Дата:
You probably need to run createlang (createlang plpgsql databasename)

On Wed, 31 Jan 2001, Raymond Chui wrote:

> I have install all latest PostgreSQL 7.0.3 packages except python
> into my Redhat Linux 6.2
>
> When I CREATE FUNCTION fname() RETURN OPAQUE AS '
> DECLARE
>     ...;
> BEGIN
>     ....;
> END;
> ' LANGUAGE 'plpgsql';
>
> I got Unrecognized language plpgsql, it only recognized sql, C, internal
> and
> created_procedure_name.
> Well, in Postgres documents has examples for Language plpgsql.
> Please tell me what do I missing, what other packages I need to install?


Re: Unrecognized language plpgsql when CREATE FUNCTION?!

От
Raymond Chui
Дата:
Be default PL/PGSQL is not installed in each database. You must type

createlang --host=hostname --port=5432 --username=postgres --dbname=yourdb
--pglib=$PGLIB plpgsql yourdb

To verify type

createlang -l yourdb

--Raymond


Вложения