Re: ERROR: syntax error at or near "select" at character 9

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: ERROR: syntax error at or near "select" at character 9
Дата
Msg-id 20050905213103.F5782@megazone.bigpanda.com
обсуждение исходный текст
Ответ на ERROR: syntax error at or near "select" at character 9  (Graf László <graf.laszlo@axis.hu>)
Список pgsql-sql
On Fri, 2 Sep 2005, [ISO-8859-2] Graf L�szl� wrote:

>
>    CREATE FUNCTION test_verif() RETURNS trigger AS $test_verif$
>        BEGIN
>            NEW.id := select nextval('test_azon_seq');

I think you want to remove select here, you're already effectively doing a
select of the right hand side in the assignment.

>            NEW.nev := nev;
I think you want to remove this line entirely.  What nev were you
expecting on the right hand side?  If it's the new one, well, NEW.new is
already that.



В списке pgsql-sql по дате отправления:

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: Weird Trigger Behaviour using IF ... THEN ... ESLEIF...
Следующее
От: "Thomas F. O'Connell"
Дата:
Сообщение: Re: Searching for results with an unknown amount of data