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

From: Gianpiero Venditti <stratio(at)hotmail(dot)it>
To: <mmoncure(at)gmail(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Postgres 8.3 Function returning a row with different number of colums
Date: 2011-08-02 07:29:15
Message-ID: DUB106-W548485C1245D52741D26A7D53B0@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


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 and an integer) in the other case.

So i can't just return everytime two columns with one null sometimes. I know this is a little strange but it's a constraint of the Gatekeeper so i have no choiche :(

This is the way i call the query from inside the gatekeeper:

select * from routing ( param1, param2, param3, param4 ) as ( result text, reason integer );

is there a way to make the reason optional?

Thanks.

Gianpiero Venditti

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2011-08-02 07:46:21 Re: Postgres 8.3 Function returning a row with different number of colums
Previous Message senthilnathan 2011-08-02 05:59:15 Timeline Conflict