Re: Error in PQsetvalue - Mailing list pgsql-hackers

From Pavel Golub
Subject Re: Error in PQsetvalue
Date
Msg-id 1411742178.20110606150915@gf.microolap.com
Whole thread Raw
In response to Re: Error in PQsetvalue  (Merlin Moncure <mmoncure@gmail.com>)
Responses Re: Error in PQsetvalue
List pgsql-hackers
Hello, guys.

You wrote:

MM> On Fri, Jun 3, 2011 at 10:36 PM, Andrew Chernow <ac@esilo.com> wrote:
>> On 6/3/2011 10:26 PM, Andrew Chernow wrote:
>>>
>>>>> I disagree -- I think the fix is a one-liner. line 446:
>>>>> if (tup_num == res->ntups&& !res->tuples[tup_num])
>>>>>
>>>>> should just become
>>>>> if (tup_num == res->ntups)
>>>>>
>>>>> also the memset of the tuple slots when the slot array is expanded can
>>>>> be removed. (in addition, the array tuple array expansion should
>>>>> really be abstracted, but that isn't strictly necessary here).
>>>>>
>>>>
>>>> All true. This is a cleaner fix to something that was in fact broken ;)
>>>> You want
>>>
>>> Attached a patch that fixes the OP's issue. PQsetvalue now uses pqAddTuple
>>> to
>>> grow the tuple table and has removed the remnants of an older idea that
>>> caused
>>> the bug.
>>>
>>
>> Sorry, I attached the wrong patch.  Here is the correct one.


MM> This looks good.  Pavel, want to test it?

Sorry for delay in answer. Yeah, I'm glad to. Should I apply this
patch by myself?

MM> merlin



-- 
With best wishes,Pavel                          mailto:pavel@gf.microolap.com



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: reducing the overhead of frequent table locks - now, with WIP patch
Next
From: Alexander Korotkov
Date:
Subject: Re: WIP: Fast GiST index build