This problem annoys me, if I have more than several hundred function
which returns different result set, like contains foreign keys, I have to create many type for function's return.


Can plpgsql returns result set according to what exactly fetched,
then take return type as references to store data for return.

Whether there is some better way to deal with this problem?

Yeah, you just make your function return 'SETOF record' and specify the types when you do the select:


select * from func() as (a int, b text);

Chris

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
     subscribe-nomail command to [EMAIL PROTECTED] so that your
     message can get through to the mailing list cleanly

Reply via email to