Craig Ringer <craig@postnewspapers.com.au> writes:
>> 2) Can i make a special type "on_the_fly" and returning setof "that_type"?
> You're better off using SETOF RECORD, at least in my opinion.
Another possibility is to return a cursor.
regards, tom lane