Re: plpython issue with Win64 (PG 9.2)

Поиск
Список
Период
Сортировка
От Jan Urbański
Тема Re: plpython issue with Win64 (PG 9.2)
Дата
Msg-id 4FF37582.8050201@wulczer.org
обсуждение исходный текст
Ответ на Re: plpython issue with Win64 (PG 9.2)  (Jan Urbański <wulczer@wulczer.org>)
Ответы Re: plpython issue with Win64 (PG 9.2)  (Asif Naeem <asif.naeem@enterprisedb.com>)
Список pgsql-hackers
On 03/07/12 17:45, Jan Urbański wrote:
> On 29/06/12 00:36, Jan Urbański wrote:
>> On 27/06/12 13:57, Jan Urbański wrote:
>>> On 27/06/12 11:51, Asif Naeem wrote:
>>>> Hi,
>>>>
>>>> On Windows 7 64bit, plpython is causing server crash with the following
>>>> test case i.e.
>
>> So: I'd add code to translate WINxxx into CPxxx when choosing the Python
>> to use, change PLy_elog to elog in PLyUnicode_Bytes and leave the
>> SQL_ASCII case alone, as there were no complaints and people using
>> SQL_ASCII are asking for it anyway.
>
> Since no one commented, I'll produce a patch to that effect. I believe
> this should go into 9.2 given that otherwise PL/Python will basically
> crash any database using the CP12xx encoding.

Patch attached. Asif, could you try a few things on a CP1252 database?

First verify if your original test case now works and then try this:

create function enctest() returns text as $$
   return b'tr\xc3\xb3spido'.decode('utf-8')
$$ language plpython3u;

select enctest(), encode(convert_to(enctest(), 'utf-8'), 'hex');

Thanks,
Jan

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Patch: add conversion from pg_wchar to multibyte
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Event Triggers reduced, v1