Re: Trigger problem

Поиск
Список
Период
Сортировка
Искать
От
Stephan Szabo
Тема
Re: Trigger problem
Дата
в 12:54:57
Msg-id
20020503085607.R67939-100000@megazone23.bigpanda.com
Ответ на
Trigger problem (jquest jquest)
Список
Дерево обсуждения
Trigger problem "jquest jquest" <jquest_j@hotmail.com>
Re: Trigger problem Stephan Szabo <sszabo@megazone23.bigpanda.com>
Re: Trigger problem Aaron Spiteri <aaron@m1group.com.au>
On Fri, 3 May 2002, jquest jquest wrote:

> Hi,
> I am new to postgresql and to this moment I am using oracle.
> I use posgresql 7.1.2
>
> I try to create very simple ( from doc. examples ) trigger:
>
> CREATE FUNCTION add_one (integer) RETURNS INTEGER AS '
>     BEGIN
>         RETURN $1 + 1;
>     END;
> ' LANGUAGE 'pgsql';
>
> But the system report:
> ERROR:  Unrecognized language specified in a CREATE FUNCTION: 'pgsql'.
> 	Recognized languages are sql, C, internal, and created procedural
> languages.
>
> I readet in documentation that pgsql is good solution for SP.
>
> Where is the problem?

You'll want to use 'plpgsql' which is the full name of the procedural
language.  If it still fails, it means that createlang was not used on
the database, and you'll want to issue a
createlang plpgsql 
as the postgres user from a shell.

В списке pgsql-admin по дате отправления
От: jquest jquest
Дата:
Сообщение: Trigger problem
От: Mark McEahern
Дата:
Сообщение: configure datatype name > 31?
FAQ