Re: Fetch zero result rows when executing a query? - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Fetch zero result rows when executing a query?
Date
Msg-id 20150204112251.GA27733@awork2.anarazel.de
Whole thread Raw
In response to Re: Fetch zero result rows when executing a query?  ("Stephen R. van den Berg" <srb@cuci.nl>)
List pgsql-hackers
On 2015-02-04 12:17:23 +0100, Stephen R. van den Berg wrote:
> Andres Freund wrote:
> >On 2015-02-03 12:26:33 +0100, Shay Rojansky wrote:
> >> find a way to execute a query but without fetching any rows. The Execute
> >> message has a maximum result-row count, but zero is documented to mean
> >> "fetch all rows".
> 
> >Is this really a relevant optimization? If the user doesn't want
> 
> I believe he's talking about the network protocol of postgreSQL, not
> about query optimisation (as you do).

I actually am not. There's no rows returned by a UPDATE without a
RETURNING. So the whole question doesn't really make much sense without
RETURNING... And I think it's premature optimization to ignore
RETURNING's results in the driver, even if the user doesn't ask for
them.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: "Stephen R. van den Berg"
Date:
Subject: Re: Fetch zero result rows when executing a query?
Next
From: Marko Tiikkaja
Date:
Subject: Re: Fetch zero result rows when executing a query?