Re: BUG #13638: Exception texts from plperl has bad encoding

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: BUG #13638: Exception texts from plperl has bad encoding
Дата
Msg-id
18478.1443209624@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
BUG #13638: Exception texts from plperl has bad encoding lei@aswsyst.cz
Re: BUG #13638: Exception texts from plperl has bad encoding Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #13638: Exception texts from plperl has bad encoding Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #13638: Exception texts from plperl has bad encoding Alvaro Herrera <alvherre@2ndquadrant.com>
Re: BUG #13638: Exception texts from plperl has bad encoding Tim Bunce <Tim.Bunce@pobox.com>
Re: BUG #13638: Exception texts from plperl has bad encoding Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #13638: Exception texts from plperl has bad encoding Alex Hunsaker <badalex@gmail.com>
Re: BUG #13638: Exception texts from plperl has bad encoding Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #13638: Exception texts from plperl has bad encoding Alex Hunsaker <badalex@gmail.com>
Re: BUG #13638: Exception texts from plperl has bad encoding Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #13638: Exception texts from plperl has bad encoding Alex Hunsaker <badalex@gmail.com>
Re: BUG #13638: Exception texts from plperl has bad encoding Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #13638: Exception texts from plperl has bad encoding Michal Leinweber <lei@aswsyst.cz>
Re: BUG #13638: Exception texts from plperl has bad encoding Michal Leinweber <lei@aswsyst.cz>
Re: BUG #13638: Exception texts from plperl has bad encoding Tom Lane <tgl@sss.pgh.pa.us>
I wrote:
> I suspect the root problem is that instead of baldly doing
> 		croak("%s", edata->message);
> in do_util_elog(), we need to do something to inform Perl what encoding
> the message string is in.  This is beyond my Perl-fu, however.

BTW, if the answer to that involves turning the message back into an SV,
I think we should not do that but just use the SV that was passed in
originally.  Then the TRY/CATCH could go away entirely, ie the code
would become roughly like

	if (level < ERROR)
	{
		cmsg = sv2cstr(msg);
		elog(level, "%s", cmsg);
		pfree(cmsg);
	}
	else
	{
		croak-with-SV(msg);
	}

which knows slightly more about the meaning of "level" than before,
but otherwise seems much less entangled with anything.

It's still beyond my Perl-fu ...

			regards, tom lane
В списке pgsql-bugs по дате отправления
От: Tom Lane
Дата:
От: Alvaro Herrera
Дата:
FAQ