Re: modifying the tbale function - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: modifying the tbale function
Date
Msg-id 45FE6D45.7050407@enterprisedb.com
Whole thread Raw
In response to Re: modifying the tbale function  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: modifying the tbale function  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Tom Lane wrote:
> Neil Conway <neilc@samurai.com> writes:
>> Returning control to the backend for every row returned would likely be 
>> excessive, but you could return once every k rows and get most of the 
>> benefits of both approaches (k might be on the order of 1000).
> 
> However, this still leaves us with no idea how to persuade perl, tcl,
> python, et al to cooperate.

It seem like a useful optimization for C-functions, though. I was caught 
by surprise a while ago when I realized that the way I've been using to 
create simple test data quickly:

INSERT INTO foo SELECT key FROM generate_series(1, <large number>) key

materializes the generate_series result set first.

I'd like to have that changed, even if we leave the behavior as it is 
for PLs.

Another affected use case is using dblink to copy large tables.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: CREATE INDEX and HOT (was Question: pg_class attributes and race conditions ?)
Next
From: "Simon Riggs"
Date:
Subject: Re: CREATE INDEX and HOT (was Question:pg_classattributes and race conditions ?)