Thread: Select function with set return type

Select function with set return type

From
"Nacef LABIDI"
Date:
<div dir="ltr">Hi all,<br /><br />I am writing some functions with retrun type as a SETOF of a datatype that I have
defined.How can I test them with a select statement.<br />Doing select my_function(); return set valued function called
incontext that cannot accept a set<br /><br />Thanks to all<br /><br />Nacef<br /></div> 

Re: Select function with set return type

From
Andreas Kretschmer
Date:
Nacef LABIDI <nacef.l@gmail.com> schrieb:

> Hi all,
> 
> I am writing some functions with retrun type as a SETOF of a datatype that I
> have defined. How can I test them with a select statement.
> Doing select my_function(); return set valued function called in context that
> cannot accept a set

Try 'select * from my_function();'


Andreas
-- 
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.                              (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly."   (unknown)
Kaufbach, Saxony, Germany, Europe.              N 51.05082°, E 13.56889°