Re: More WITH - Mailing list pgsql-hackers

From Tom Lane
Subject Re: More WITH
Date
Msg-id 28844.1440182385@sss.pgh.pa.us
Whole thread Raw
In response to Re: More WITH  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: More WITH  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Tue, Aug 18, 2015 at 11:23 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> More generally, what would you hope to accomplish with such a construct
>> that wouldn't be better done by writing the cursor's underlying query
>> directly in the WITH clause?

> Maybe I'm stupid today, but it seems like the obvious use case would
> be fetching some but not all rows from the cursor?

And how many rows would that be?  As I said, the proposed syntax leaves
it completely unclear how many rows get fetched or what the ending cursor
position is; but especially so if you want the answer to be something
other than "all/the end".
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: (full) Memory context dump considered harmful
Next
From: Robert Haas
Date:
Subject: Re: Reduce ProcArrayLock contention