Re: its posible to use a 2 column returning function as a subquery?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: its posible to use a 2 column returning function as a subquery?
Дата
Msg-id 11732.1252705494@sss.pgh.pa.us
обсуждение исходный текст
Ответ на its posible to use a 2 column returning function as a subquery?  (Gerardo Herzig <gherzig@fmed.uba.ar>)
Список 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 по дате отправления:

Предыдущее
От: Gerardo Herzig
Дата:
Сообщение: its posible to use a 2 column returning function as a subquery?
Следующее
От: Rajesh Kumar Mallah
Дата:
Сообщение: schema proxying virtual database