Re: PL/pgSQL: How to return two columns and multiple rows

Поиск
Список
Период
Сортировка
От Sven Geggus
Тема Re: PL/pgSQL: How to return two columns and multiple rows
Дата
Msg-id mluie2$vns$3@solar.geggus.net
обсуждение исходный текст
Ответ на PL/pgSQL: How to return two columns and multiple rows  (Sven Geggus <lists@fuchsschwanzdomain.de>)
Ответы Re: PL/pgSQL: How to return two columns and multiple rows  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-general
Raymond O'Donnell <rod@iol.ie> wrote:

>> mydb=> select myfunc('foo','bar');
>
> You need to do:
>
>    select * from myfunc('foo','bar');

This has been a misguided example. Reality should more likely look like this:

select myfunc(col1,col2) from mytable;

And it would of course be undesired if myfunc would be called twice per row.
So how would this look like to avoid the function beeing called twice?

Regards

Sven

--
"Der wichtigste Aspekt, den Sie vor der Entscheidung für ein Open
Source-Betriebssystem bedenken sollten, ist, dass Sie kein
Windows-Betriebssystem erhalten." (von http://www.dell.de/ubuntu)
/me is giggls@ircnet, http://sven.gegg.us/ on the Web

В списке pgsql-general по дате отправления:

Предыдущее
От: Sven Geggus
Дата:
Сообщение: Re: PL/pgSQL: How to return two columns and multiple rows
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: PL/pgSQL: How to return two columns and multiple rows