Re: [GENERAL] Postgres 8.3 Function returning a row with different number of colums

2011-08-02 Thread John R Pierce
On 08/02/11 12:29 AM, Gianpiero Venditti wrote: First of all thanks for the quick replies, i'll describe my problem more in detail. I'm using postgress with the latest release of GNU Gatekeeper. More specifically I need a query that returns a row with exactly a single column (a text) in one c

Re: [GENERAL] Postgres 8.3 Function returning a row with different number of colums

2011-08-02 Thread Gianpiero Venditti
First of all thanks for the quick replies, i'll describe my problem more in detail. I'm using postgress with the latest release of GNU Gatekeeper. More specifically I need a query that returns a row with exactly a single column (a text) in one case and a row with exactly two columns (a text an

Re: [GENERAL] Postgres 8.3 Function returning a row with different number of colums

2011-08-01 Thread Merlin Moncure
On Mon, Aug 1, 2011 at 1:51 PM, Gianpiero Venditti wrote: > Hello, I need to write a function that sometimes return a row with only a > column and sometimes return a row with two columns. > > Is it possible to do something like this with record type? > > If it's not what's the best alternative to

Re: [GENERAL] Postgres 8.3 Function returning a row with different number of colums

2011-08-01 Thread David Johnston
> > Is it possible to do something like this with record type? > > Yes. The docs, while possibly somewhat confusing, cover this need. If you have a more specific question (and possibly provide more details as to why you have this need) you will be more likely to get a detailed answer. Davi

[GENERAL] Postgres 8.3 Function returning a row with different number of colums

2011-08-01 Thread Gianpiero Venditti
Hello, I need to write a function that sometimes return a row with only a column and sometimes return a row with two columns. Is it possible to do something like this with record type? If it's not what's the best alternative to achieve such a result? Thanks in advance for your help. Gianpier