Connecting Tech Pros Worldwide Forums | Help | Site Map

Using the result of a function that RETURNS SETOF

Newbie
 
Join Date: Sep 2007
Posts: 1
#1: Sep 19 '07
I wrote a function to list the content of a group :

Expand|Select|Wrap|Line Numbers
  1. create or replace function members(int,char)
  2. returns setof int as...
To list the content of group 2 I execute :

Expand|Select|Wrap|Line Numbers
  1. select * from members(2,'*') memberid;
Now I want to list all the members of each group but I can't figure out the correct syntax (despite several semantically heretic tries).

Something like :

Expand|Select|Wrap|Line Numbers
  1. select idgroup,members(idgroup,'*') from groups;
Someone has a clue ?

TIA,

Reply