Re: [WIP] plpgsql is not translate-aware

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [WIP] plpgsql is not translate-aware
Дата
Msg-id 1349.1223508083@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [WIP] plpgsql is not translate-aware  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: [WIP] plpgsql is not translate-aware  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Tom Lane wrote:
>> --- this looks like it could result in passing a NULL to dgettext,
>> somewhere along the line.  Probably safer to pass "postgres".

> Hmm, I was trusting that dgettext is documented to accept a NULL as
> meaning "use the domain previously set with textdomain", but then it is 
> possible that elog() will be called before textdomain is set, so you
> might be right.  Fixed in this new version.

Another way, which would save some amount of string constant space,
is to have both elog_finish and the ereport macro pass NULL, and let
errstart insert the default:

> +     edata->domain = domain ? domain : "postgres";

Otherwise we'll have at least one copy of "postgres" per backend .o
file ...
        regards, tom lane


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: [WIP] plpgsql is not translate-aware
Следующее
От: Kris Jurka
Дата:
Сообщение: Fixes for psql describeOneTableDetails