Re: [COMMITTERS] pgsql: Fix breakage from earlier plperl fix.

Поиск
Список
Период
Сортировка
От Alex Hunsaker
Тема Re: [COMMITTERS] pgsql: Fix breakage from earlier plperl fix.
Дата
Msg-id CAFaPBrT3AOzrKHZJ=2P5aD+kEXEKEgaBHwLJB_uqqnXBHKProw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [COMMITTERS] pgsql: Fix breakage from earlier plperl fix.  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: [COMMITTERS] pgsql: Fix breakage from earlier plperl fix.  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
On Thu, Jan 5, 2012 at 16:59, Andrew Dunstan <andrew@dunslane.net> wrote:
>
>
> On 01/05/2012 06:31 PM, Alex Hunsaker wrote:
>>
>> On Thu, Jan 5, 2012 at 16:02, Andrew Dunstan<andrew@dunslane.net>  wrote:
>>>
>>> Fix breakage from earlier plperl fix.

>> I can't help but think this seems a bit inefficient
>
> So, yes, we should probably adjust this one more time, but ideally we need a
> better test than just SvREADONLY(). If you want to follow up your
> investigation of exactly when we need a copied SV and see how much you can
> narrow it down that would be great.

After further digging I found it chokes on any non scalar (IOW any
reference). I attached a simple c program that I tested with 5.8.9,
5.10.1, 5.12.4 and 5.14.2 (for those who did not know about it,
perlbrew made testing across all those perls relatively painless).

PFA that copies if its readonly and its not a scalar. Also I fixed up
Tom's complaint about having sv2cstr() inside do_util_elog's PG_TRY
block. I didn't bother fixing the ones in plperl.c tho-- some seemed
like they would require quite a bit of rejiggering.

I didn't bother adding regression tests-- should I have?

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: 16-bit page checksums for 9.2
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Poorly thought out code in vacuum