Re: [PATCH 4/4] Add tests to dblink covering use of COPY TO FUNCTION - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH 4/4] Add tests to dblink covering use of COPY TO FUNCTION
Date
Msg-id 22154.1259174093@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCH 4/4] Add tests to dblink covering use of COPY TO FUNCTION  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-hackers
Jeff Davis <pgsql@j-davis.com> writes:
> On Wed, 2009-11-25 at 09:23 +0100, Pavel Stehule wrote:
>>> If SRFs use a tuplestore in that situation, it sounds like that should
>>> be fixed. Why do we need to provide alternate syntax involving COPY?
>> 
>> It isn't problem of SRF function design. It allow both mode - row and
>> tuplestor.

> select * from generate_series(1,1000000000) limit 1;

> That statement takes a long time, which indicates to me that it's
> materializing the result of the SRF.

Yeah.  This is certainly fixable if someone wants to do the legwork of
refactoring ExecMakeTableFunctionResult().  It was done that way
originally just to keep down the complexity of introducing the
function-as-table-source feature at all.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: float value is rounded
Next
From: Tom Lane
Date:
Subject: Re: float value is rounded