Re: Fetch zero result rows when executing a query?

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: "Stephen R(dot) van den Berg" <srb(at)cuci(dot)nl>
Cc: Shay Rojansky <roji(at)roji(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Fetch zero result rows when executing a query?
Date: 2015-02-04 11:22:51
Message-ID: 20150204112251.GA27733@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Marko Tiikkaja 2015-02-04 11:23:51 Re: Fetch zero result rows when executing a query?
Previous Message Stephen R. van den Berg 2015-02-04 11:17:23 Re: Fetch zero result rows when executing a query?