> gher...@fmed.uba.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 > > -- > Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-sql Well, aparenty my problem remains, because the boss want that the programmers just need to call select * from report('table_name'). Following your previous sample function, im forced to use it in the form select * from report('table_name') as x(a int, b varchar, c int), and that "as x(...)" is the kind of thing hes triyng to avoid. Same feeling about fetching records at application level. To bad for me, im affraid :(
Gerardo -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql