Re: [BUGS] BUG #2683: spi_exec_query in plperl returns column names which are not marked as UTF8

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [BUGS] BUG #2683: spi_exec_query in plperl returns column names which are not marked as UTF8
Дата
Msg-id 14224.1160877310@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: [BUGS] BUG #2683: spi_exec_query in plperl returns column names which are not marked as UTF8  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
"Vitali Stupin" <Vitali.Stupin@ria.ee> writes:
> If database uses UTF8 encoding, then spi_exec_query in plperl should return
> query results in UTF8 encoding. But unfortunately only data is marked as
> UTF8, while column names are not.

It looks to me like basically everywhere in plperl.c that does newSVpv()
should follow it with

#if PERL_BCDVERSION >= 0x5006000L           if (GetDatabaseEncoding() == PG_UTF8)               SvUTF8_on(sv);
#endif

whereas currently there are only a couple of places that do that.

I'm tempted to consolidate this into a function on the order of
newSVstring(const char *) or some such.  Comments?
        regards, tom lane


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

Предыдущее
От: Sean Davis
Дата:
Сообщение: Re: Problems building 8.2beta1 on macos G5 xserve
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [PATCHES] large object regression tests