Re: its posible to use a 2 column returning function as a subquery? - Mailing list pgsql-sql

From Tom Lane
Subject Re: its posible to use a 2 column returning function as a subquery?
Date
Msg-id 11732.1252705494@sss.pgh.pa.us
Whole thread Raw
In response to its posible to use a 2 column returning function as a subquery?  (Gerardo Herzig <gherzig@fmed.uba.ar>)
List pgsql-sql
Gerardo Herzig <gherzig@fmed.uba.ar> writes:
> There is some syntax for calling get_desc_and_price only once?

Do something like

select (t).* from (select get_desc_and_price(shoe) as t from ...) ss;

If you don't have get_desc_and_price marked as volatile, you'll probably
also need to add "offset 0" to the sub-select to keep the planner from
flattening the sub-select and producing multiple calls of the function.
        regards, tom lane


pgsql-sql by date:

Previous
From: Gerardo Herzig
Date:
Subject: its posible to use a 2 column returning function as a subquery?
Next
From: Rajesh Kumar Mallah
Date:
Subject: schema proxying virtual database