| От | Tom Lane |
|---|---|
| Тема | Re: Error handling fix in interfaces/libpq/fe-secure.c |
| Дата | |
| Msg-id | 25699.1120658138@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Error handling fix in interfaces/libpq/fe-secure.c (jtv@xs4all.nl) |
| Список | pgsql-patches |
jtv@xs4all.nl writes:
> Tom Lane wrote:
>> The gettext function does not modify the value of the global errno
>> variable. This is necessary to make it possible to write something like
>>
>> printf (gettext ("Operation failed: %m\n"));
>>
>> which is pretty much what I expected to find. Ergo, this entire
>> discussion is wrong, and whatever bug you are concerned about will
>> not be solved this way.
> Tom, I didn't know that gettext() preserved errno--but I still believe
> you're wrong. The problem is not gettext() but libpq_gettext(). The
> latter calls the former, but it may go through initialization first--which
> would still pollute errno on the first call.
Good point --- we should make it save and restore errno around the
bindtextdomain() call. Will do.
regards, tom lane
В списке pgsql-patches по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера