Re: Error in PQsetvalue - Mailing list pgsql-hackers

From Merlin Moncure
Subject Re: Error in PQsetvalue
Date
Msg-id BANLkTikrLd_LUnG98Vos2y9fvGT=mP44sQ@mail.gmail.com
Whole thread Raw
In response to Re: Error in PQsetvalue  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Error in PQsetvalue
List pgsql-hackers
On Wed, Jun 8, 2011 at 10:18 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Merlin Moncure <mmoncure@gmail.com> writes:
>> I went ahead and tested andrew's second patch -- can we get this
>> reviewed and committed?
>
> Add it to the upcoming commitfest.

It's a client crashing bug in PQsetvalue that goes back to 9.0 :(.  In
short (apologies for the non-context diff), PQsetvalue was
inappropriately using libpq tuple slots as a check to see if it should
allocate the per row tuple datums, and borked when setting values on a
non copied result (libpqtypes always copies results) because the
regular pqAddTuple does not null out the slots like copy result does.
The whole mechanism was basically unnecessary, so it was removed,
fixing the bug.

merlin


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: reindex creates predicate lock on index root
Next
From: Jeff Davis
Date:
Subject: Re: Range Types and extensions