Re: patch: garbage error strings in libpq

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: patch: garbage error strings in libpq
Дата
Msg-id 12996.1120574333@sss.pgh.pa.us
обсуждение исходный текст
Ответ на patch: garbage error strings in libpq  (jtv@xs4all.nl)
Ответы Re: patch: garbage error strings in libpq
Список pgsql-patches
jtv@xs4all.nl writes:
> Another approach would have been to make libpq_gettext() preserve errno.

That seems like a far easier, cleaner, and more robust fix than this.

Moreover I don't believe that this approach works either, as the result
of strerror() is not guaranteed still usable after another strerror call
(ie, it can use a static buffer repeatedly), so you'd still have the
problem if libpq_gettext invokes strerror.  I suppose that a really
robust solution would involve libpq_gettext saving errno, restoring
errno, and invoking strerror() again ...

            regards, tom lane

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

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: pgcrypto volatility and strictness changes
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Error handling fix in interfaces/libpq/fe-secure.c