No title

Started by ownerover 23 years ago3 messagesbugs
Jump to latest
#1owner
ivan@psycho.pl

i've CREATE FUNCTION iv_get(int) RETURNS SETOF same_table AS ' select *
from same_table; ' LANGUAGE SQL;

and then

medyk=# SELECT * FROM iv_get(0);
ERROR: parser: parse error at or near "("

why ?? is there somethink bad
?? same_table of course exists, but why i've this error ? its a bug ??

or is some other way to select somethink throught function , my function
??

#2Stephan Szabo
sszabo@megazone23.bigpanda.com
In reply to: owner (#1)
Re:

On Sat, 28 Dec 2002, owner wrote:

i've CREATE FUNCTION iv_get(int) RETURNS SETOF same_table AS ' select *
from same_table; ' LANGUAGE SQL;

and then

medyk=# SELECT * FROM iv_get(0);
ERROR: parser: parse error at or near "("

why ?? is there somethink bad
?? same_table of course exists, but why i've this error ? its a bug ??

My guess is that you're not running a version prior to 7.3.

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: owner (#1)
Re:

owner <ivan@psycho.pl> writes:

i've CREATE FUNCTION iv_get(int) RETURNS SETOF same_table AS ' select *
from same_table; ' LANGUAGE SQL;
and then
medyk=# SELECT * FROM iv_get(0);
ERROR: parser: parse error at or near "("

Works for me. I suspect you are trying to use 7.3 features with a
pre-7.3 Postgres installation.

regards, tom lane