pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Harald Fuchs <hf0614x@protecting.net>
To: pgsql-sql@postgresql.org
Subject: Re: ERROR:  syntax error at or near "select" at character 9
Date: 06 Sep 2005 10:57:58 +0200
Message-ID: <871x427euh.fsf@srv.protecting.net> (raw)
References: <4317FE8C.7020803@axis.hu>
	<20050905213103.F5782@megazone.bigpanda.com>

In article <20050905213103.F5782@megazone.bigpanda.com>,
Stephan Szabo <sszabo@megazone.bigpanda.com> writes:

> 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.

László could also remove the entire trigger and use something like


CREATE TABLE test (
  id SERIAL NOT NULL,
  nev VARCHAR(25),
  datum TIMESTAMP NOT NULL DEFAULT current_timestamp,
  PRIMARY KEY (id)
);




view thread (4+ messages)  latest in thread

Message-ID: <871x427euh.fsf@srv.protecting.net>
Permalink:  ../871x427euh.fsf@srv.protecting.net/
Also on:    postgresql.org/message-id/871x427euh.fsf@srv.protecting.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: hf0614x@protecting.net
  Subject: Re: ERROR:  syntax error at or near "select" at character 9
  In-Reply-To: <871x427euh.fsf@srv.protecting.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox