| From: | Merlin Moncure <mmoncure(at)gmail(dot)com> |
|---|---|
| To: | Andrew Chernow <ac(at)esilo(dot)com> |
| Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Pavel Golub <pavel(at)microolap(dot)com> |
| Subject: | Re: Error in PQsetvalue |
| Date: | 2011-06-04 12:45:50 |
| Message-ID: | BANLkTimP3GEP7SzO2gLemzQO5c9_FKkArg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri, Jun 3, 2011 at 10:36 PM, Andrew Chernow <ac(at)esilo(dot)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.
This looks good. Pavel, want to test it?
merlin
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrew Dunstan | 2011-06-04 12:47:02 | ts_count |
| Previous Message | Nick Raj | 2011-06-04 11:51:30 | Re: Cube Index Size |