gherzig(at)fmed(dot)uba(dot)ar wrote:
> Oh, that looks promising. I wrongly supposed that RETURNING SETOF RECORD
> forces the use of OUT parameters. I will give your idea a try.
Tom Lane's point about using a refcursor is (unsurprisingly) a good one.
If you return a refcursor from your function, you don't have to do any
special work to call the function, and you can (with most DB access
APIs) FETCH records from the cursor rather conveniently.
See:
http://www.postgresql.org/docs/8.3/static/plpgsql-cursors.html
--
Craig Ringer