Re: plpgsql is not translate-aware
От | Tom Lane |
---|---|
Тема | Re: plpgsql is not translate-aware |
Дата | |
Msg-id | 17581.1221532833@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: plpgsql is not translate-aware (Alvaro Herrera <alvherre@commandprompt.com>) |
Ответы |
Re: [WIP] plpgsql is not translate-aware
|
Список | pgsql-hackers |
Alvaro Herrera <alvherre@commandprompt.com> writes: > Tom Lane wrote: >> Can't we give it its own text domain? It seems fundamentally wrong >> for a plug-in language to require core support for its messages. > Another idea would be to redefine errmsg() and friends within the > plpgsql sources, but that seems worse because every other library will > need to do the same. > Refinement of the previous idea: maybe we can add a compiler flag, to be > set in Makefiles, that defines the domain and passes it down to > EVALUATE_MESSAGE. It seems like something like that could work. I'd be inclined to change the ereport() macro itself, not errmsg/errdetail/etc. The domain name could be passed in at ereport and then used when evaluating the messages. A possible problem is that some places use _() (ie, gettext) directly instead of leaving it to the elog.c code to apply translation. But I suppose we might be able to redefine _() too. regards, tom lane
В списке pgsql-hackers по дате отправления: