On Tue, Mar 6, 2012 at 10:21 AM, Jan Otto wrote:
> hi,
>
>> I've complained many times that
>> select (f()).*;
>>
>> will execute f() once for each returned field of f() since the server
>> essentially expands that into:
>>
>> select f().a, f().b;
>>
>> try it yourself, see:
>> create function f(a
hi,
> I've complained many times that
> select (f()).*;
>
> will execute f() once for each returned field of f() since the server
> essentially expands that into:
>
> select f().a, f().b;
>
> try it yourself, see:
> create function f(a out text, b out text) returns record as $$
> begin
> perfo
On Mon, Mar 5, 2012 at 6:41 PM, Peter van Hardenberg wrote:
> On Mon, Mar 5, 2012 at 3:15 PM, Merlin Moncure wrote:
>> I've complained many times that
>> select (f()).*;
>>
>> will execute f() once for each returned field of f() since the server
>> essentially expands that into:
>>
>> select f().
On Mon, Mar 5, 2012 at 3:15 PM, Merlin Moncure wrote:
> I've complained many times that
> select (f()).*;
>
> will execute f() once for each returned field of f() since the server
> essentially expands that into:
>
> select f().a, f().b;
>
oh, this is why we expand rows inside a WITH statement.
I've complained many times that
select (f()).*;
will execute f() once for each returned field of f() since the server
essentially expands that into:
select f().a, f().b;
try it yourself, see:
create function f(a out text, b out text) returns record as $$
begin
perform pg_sleep(1);
a := 'a';