pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Zhihong Yu <zyu@yugabyte.com>
Cc: Craig Ringer <craig.ringer@enterprisedb.com>
Cc: Matthieu Garrigues <matthieu.garrigues@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@lists.postgresql.org>
Subject: Re: PATCH: Batch/pipelining support for libpq
Date: Fri, 19 Feb 2021 15:35:09 -0300
Message-ID: <20210219183509.GA4851@alvherre.pgsql> (raw)
In-Reply-To: <CALNJ-vTk+Bhtn0gjSS3KO7U+E34uDUfFbXZ6VRexXE-KKrnRNw@mail.gmail.com>

Hello, thanks for looking at this patch.

On 2021-Feb-16, Zhihong Yu wrote:

> +       if (querymode == QUERY_SIMPLE)
> +       {
> +           commandFailed(st, "startpipeline", "cannot use pipeline mode
> with the simple query protocol");
> +           st->state = CSTATE_ABORTED;
> +           return CSTATE_ABORTED;
> 
> I wonder why the st->state is only assigned for this if block. The state is
> not set for other cases where CSTATE_ABORTED is returned.

Yeah, that's a simple oversight.  We don't need to set st->state,
because the caller sets it to the value we return.

> Should PQ_PIPELINE_OFF be returned for the following case ?
> 
> +PQpipelineStatus(const PGconn *conn)
> +{
> +   if (!conn)
> +       return false;

Yep.

Thanks

-- 
Álvaro Herrera                            39°49'30"S 73°17'W





view thread (182+ messages)  latest in thread

Message-ID: <20210219183509.GA4851@alvherre.pgsql>
Permalink:  ../20210219183509.GA4851@alvherre.pgsql/
Also on:    postgresql.org/message-id/20210219183509.GA4851@alvherre.pgsql

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: alvherre@alvh.no-ip.org, zyu@yugabyte.com, craig.ringer@enterprisedb.com, matthieu.garrigues@gmail.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: PATCH: Batch/pipelining support for libpq
  In-Reply-To: <20210219183509.GA4851@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox