Re: [Bug fix] PQsendQuery occurs error when target_session_attrs is set to read-write

From: "Higuchi, Daisuke" <higuchi(dot)daisuke(at)jp(dot)fujitsu(dot)com>
To: 'Ashutosh Bapat' <ashutosh(dot)bapat(at)enterprisedb(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [Bug fix] PQsendQuery occurs error when target_session_attrs is set to read-write
Date: 2017-02-02 05:19:51
Message-ID: 1803D792815FC24D871C00D17AE95905AC9663@g01jpexmbkw24
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

From: Ashutosh Bapat [mailto:ashutosh(dot)bapat(at)enterprisedb(dot)com]
>Sorry, attached wrong patch. Here's the right one.
> The code expects that there will be two PQgetResult() calls required.
> One to fetch the result of SHOW command and the other to extract NULL.
> If we require more calls or unexpected results, we should throw and
> error. The patch just checks the first result and consumes the
> remaining without verifying them. Also, it looks like we can not clear
> result of PQgetResult() before using the values or copying them
> somewhere else [1]. Here's updated patch which tries to do that.
> Please let me know if this looks good to you.
Oh, I had a basic misunderstanding. Thank you for correct me.
There is no problem in the patch you attached. I agree with you.

Regards,
Daisuke, Higuchi

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2017-02-02 05:36:52 Re: Cannot shutdown subscriber after DROP SUBSCRIPTION
Previous Message Pavan Deolasee 2017-02-02 05:16:12 Re: Patch: Write Amplification Reduction Method (WARM)