Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id B6DDA475E22 for ; Thu, 9 Jan 2003 06:52:32 -0500 (EST) Received: from serwer.skawsoft.com.pl (serwer.skawsoft.com.pl [213.25.37.66]) by postgresql.org (Postfix) with ESMTP id 1D3F9475CCE for ; Thu, 9 Jan 2003 06:52:32 -0500 (EST) Received: from klaster.net (pe125.krakow.cvx.ppp.tpnet.pl [213.76.40.125]) by serwer.skawsoft.com.pl (Postfix) with ESMTP id 9FF162B21C; Thu, 9 Jan 2003 12:50:28 +0100 (CET) Message-ID: <3E1D6362.80701@klaster.net> Date: Thu, 09 Jan 2003 12:56:18 +0100 From: Tomasz Myrta User-Agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.2b) Gecko/20021016 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Radu-Adrian Popescu Cc: pgsql-sql@postgresql.org Subject: Re: SQL function parse error ? References: <008f01c2b7d0$3733fdf0$0600a8c0@rpopescu> In-Reply-To: <008f01c2b7d0$3733fdf0$0600a8c0@rpopescu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/121 X-Sequence-Number: 10986 Radu-Adrian Popescu wrote: > > Take the following for example: > create or replace function testfunc1(int) returns setof test as > ' > select * from test where age>$1; > ' ^^^^^^ > language sql; I didn't find it in documentation, but sql functions are like bash (you forgot about space character): create or replace function testfunc1(int) returns setof test as ' select * from test where age > $1; ' works fine. Postgresql thinks that >$ is an operator instead of > Tomasz Myrta