Re: [GENERAL] Return unknown resultset from a function

2012-03-05 Thread Merlin Moncure
On Mon, Mar 5, 2012 at 10:08 AM, Tom Lane wrote: > Merlin Moncure writes: >> The only exception to this rule is cursors.  Reading from cursors via >> FETCH allows you to pull data from a refcursor that was set up in a >> previous function call and works pretty well, but comes with the giant >> do

Re: [GENERAL] Return unknown resultset from a function

2012-03-05 Thread Tom Lane
Merlin Moncure writes: > The only exception to this rule is cursors. Reading from cursors via > FETCH allows you to pull data from a refcursor that was set up in a > previous function call and works pretty well, but comes with the giant > downside that the results can be directed only to the clie

Re: [GENERAL] Return unknown resultset from a function

2012-03-05 Thread Merlin Moncure
On Sun, Mar 4, 2012 at 1:52 PM, Jan Meyland Andersen wrote: > How do I return an unknown resultset from a function > > My main problem is that I do not know how many columns or the data type of > the columns before runtime. > It this possible at all? > > I also tried to return the data as a text a

Re: [GENERAL] Return unknown resultset from a function

2012-03-04 Thread Rory Campbell-Lange
On 04/03/12, Rory Campbell-Lange (r...@campbell-lange.net) wrote: > On 04/03/12, Jan Meyland Andersen (j...@agile.dk) wrote: > > My main problem is that I do not know how many columns or the data > > type of the columns before runtime. > > It this possible at all? > There is a section on this in

Re: [GENERAL] Return unknown resultset from a function

2012-03-04 Thread Rory Campbell-Lange
On 04/03/12, Jan Meyland Andersen (j...@agile.dk) wrote: > How do I return an unknown resultset from a function > > My main problem is that I do not know how many columns or the data > type of the columns before runtime. > It this possible at all? > > I also tried to return the data as a text arr

Re: [GENERAL] Return unknown resultset from a function

2012-03-04 Thread David Johnston
On Mar 4, 2012, at 14:52, Jan Meyland Andersen wrote: > How do I return an unknown resultset from a function > > My main problem is that I do not know how many columns or the data type of > the columns before runtime. > It this possible at all? > > I also tried to return the data as a text a

Re: [GENERAL] Return unknown resultset from a function

2012-03-04 Thread Pavel Stehule
Hello 2012/3/4 Jan Meyland Andersen : > How do I return an unknown resultset from a function > > My main problem is that I do not know how many columns or the data type of > the columns before runtime. > It this possible at all? > no, or it is not possible simply. PostgreSQL is strongly typed. I

[GENERAL] Return unknown resultset from a function

2012-03-04 Thread Jan Meyland Andersen
How do I return an unknown resultset from a function My main problem is that I do not know how many columns or the data type of the columns before runtime. It this possible at all? I also tried to return the data as a text array but I also have trouble with that. Regards Jan -- Sent via p