X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 15F6ED8164 for ; Tue, 6 Sep 2005 01:35:11 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 19240-07 for ; Tue, 6 Sep 2005 04:35:09 +0000 (GMT) Received: from megazone.bigpanda.com (megazone.bigpanda.com [64.147.171.210]) by svr1.postgresql.org (Postfix) with ESMTP id 56943D80AB for ; Tue, 6 Sep 2005 01:35:09 -0300 (ADT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 94964354CA; Mon, 5 Sep 2005 21:35:09 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 92FE7354C4; Mon, 5 Sep 2005 21:35:09 -0700 (PDT) Date: Mon, 5 Sep 2005 21:35:09 -0700 (PDT) From: Stephan Szabo To: =?ISO-8859-2?Q?Graf_L=E1szl=F3?= Cc: pgsql-sql@postgresql.org, peter_e@gmx.net Subject: Re: ERROR: syntax error at or near "select" at character 9 In-Reply-To: <4317FE8C.7020803@axis.hu> Message-ID: <20050905213103.F5782@megazone.bigpanda.com> References: <4317FE8C.7020803@axis.hu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN Content-Transfer-Encoding: QUOTED-PRINTABLE X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 required=5 tests=[AWL=0.006] X-Spam-Level: X-Archive-Number: 200509/56 X-Sequence-Number: 22603 On Fri, 2 Sep 2005, [ISO-8859-2] Graf L=E1szl=F3 wrote: > > CREATE FUNCTION test_verif() RETURNS trigger AS $test_verif$ > BEGIN > NEW.id :=3D 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 :=3D 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.