Re: SQL function parse error ?

From: Tomasz Myrta <jasiek(at)klaster(dot)net>
To: Radu-Adrian Popescu <radu(dot)popescu(at)aldratech(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: SQL function parse error ?
Date: 2003-01-09 11:56:18
Message-ID: 3E1D6362.80701@klaster.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Radu-Adrian Popescu 2003-01-09 12:43:02 Re: SQL function parse error ?
Previous Message Radu-Adrian Popescu 2003-01-09 11:14:02 SQL function parse error ?