Thread: Function returning setof more than 1 table
Can I have a function (language sql) returning SETOF more than one table?
Thanks,
Jas
Thanks,
Jas
am Fri, dem 27.10.2006, um 4:30:47 -0400 mailte J S B folgendes: > Can I have a function (language sql) returning SETOF more than one table? You can create some tables within the function... Andreas -- Andreas Kretschmer Kontakt: Heynitz: 035242/47215, D1: 0160/7141639 (mehr: -> Header) GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net
On 10/27/06, J S B <jsbali@gmail.com> wrote: > Can I have a function (language sql) returning SETOF more than one table? > > Thanks, > Jas no, but you can return a record of refcursors. note this is plpgsql. if you are willing to bend on the language, you will find refcursors to be pretty cool, you can pass them to other functions, kind of like handles to query results. in pure sql, you pretty much have to write to temp tables. make sure you create the temp table before you run the function... merlin