| From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> | 
|---|---|
| To: | Zhihong Yu <zyu(at)yugabyte(dot)com> | 
| Cc: | Craig Ringer <craig(dot)ringer(at)enterprisedb(dot)com>, Matthieu Garrigues <matthieu(dot)garrigues(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)lists(dot)postgresql(dot)org> | 
| Subject: | Re: PATCH: Batch/pipelining support for libpq | 
| Date: | 2021-02-19 18:35:09 | 
| Message-ID: | 20210219183509.GA4851@alvherre.pgsql | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alvaro Herrera | 2021-02-19 18:43:23 | Re: PATCH: Batch/pipelining support for libpq | 
| Previous Message | Jan Wieck | 2021-02-19 18:30:54 | Re: Extensibility of the PostgreSQL wire protocol |