From: Tomasz Myrta <jasiek@klaster.net>
To: Radu-Adrian Popescu <radu.popescu@aldratech.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: SQL function parse error ?
Date: Thu, 09 Jan 2003 12:56:18 +0100
Message-ID: <3E1D6362.80701@klaster.net> (raw)
In-Reply-To: <008f01c2b7d0$3733fdf0$0600a8c0@rpopescu>
References: <008f01c2b7d0$3733fdf0$0600a8c0@rpopescu>
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
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: jasiek@klaster.net, radu.popescu@aldratech.com
Subject: Re: SQL function parse error ?
In-Reply-To: <3E1D6362.80701@klaster.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