Re: [HACKERS] [Bug fix] PQsendQuery occurs error whentarget_session_attrs is set to read-write - Mailing list pgsql-hackers

From Higuchi, Daisuke
Subject Re: [HACKERS] [Bug fix] PQsendQuery occurs error whentarget_session_attrs is set to read-write
Date
Msg-id 1803D792815FC24D871C00D17AE95905AC9663@g01jpexmbkw24
Whole thread Raw
In response to Re: [HACKERS] [Bug fix] PQsendQuery occurs error whentarget_session_attrs is set to read-write  (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>)
List pgsql-hackers
From: Ashutosh Bapat [mailto:ashutosh.bapat@enterprisedb.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


pgsql-hackers by date:

Previous
From: Pavan Deolasee
Date:
Subject: Re: [HACKERS] Patch: Write Amplification Reduction Method (WARM)
Next
From: Michael Paquier
Date:
Subject: Re: [HACKERS] Cannot shutdown subscriber after DROP SUBSCRIPTION