Re: PL/pgSQL: How to return two columns and multiple rows - Mailing list pgsql-general

From Sven Geggus
Subject Re: PL/pgSQL: How to return two columns and multiple rows
Date
Msg-id mluie2$vns$3@solar.geggus.net
Whole thread Raw
In response to PL/pgSQL: How to return two columns and multiple rows  (Sven Geggus <lists@fuchsschwanzdomain.de>)
Responses Re: PL/pgSQL: How to return two columns and multiple rows
List 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 by date:

Previous
From: Sven Geggus
Date:
Subject: Re: PL/pgSQL: How to return two columns and multiple rows
Next
From: "David G. Johnston"
Date:
Subject: Re: PL/pgSQL: How to return two columns and multiple rows