From: | Herve Lefebvre <aegir(at)rocketmail(dot)com> |
---|---|
To: | pgsql-general(at)postgreSQL(dot)org |
Subject: | [GENERAL][SQL] Functions with composite resutl-set |
Date: | 1998-07-21 14:19:35 |
Message-ID: | 19980721141935.24087.rocketmail@web2.rocketmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi all,
I've a function who retrieves multiple columns:
CREATE FUNCTION myfunc() RETURNS SETOF mytable
AS 'SELECT a,b,c FROM mytable;' LANGUAGE 'sql';
When I call it, I cannot retrieve all columns without
executing 3 times the function.
select myfunc() does not work
select a(myfunc()), b(myfunc()), c(myfunc()) works but executes 3
times the function.
I've tried
select *(mynfunc())
select all(myfunc())
select myfunc()::mytable
select myfunc()::mytable.*
...
But i've a syntax error on each of these.
Any help ? Thanks.
--
Herve LEFEBVRE
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com
From | Date | Subject | |
---|---|---|---|
Next Message | Matt McClure | 1998-07-21 14:30:36 | Re: [GENERAL] [SQL] Can I store bitmap graphics in a table? |
Previous Message | Dan Delaney | 1998-07-21 13:56:42 | [SQL] Can I store bitmap graphics in a table? |