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

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Graf László <graf(dot)laszlo(at)axis(dot)hu>
Cc: pgsql-sql(at)postgresql(dot)org, peter_e(at)gmx(dot)net
Subject: Re: ERROR: syntax error at or near "select" at character 9
Date: 2005-09-06 04:35:09
Message-ID: 20050905213103.F5782@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


On Fri, 2 Sep 2005, [ISO-8859-2] Graf Lszl 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.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Thomas F. O'Connell 2005-09-06 04:38:42 Re: Searching for results with an unknown amount of data
Previous Message Stephan Szabo 2005-09-06 04:30:35 Re: Weird Trigger Behaviour using IF ... THEN ... ESLEIF...