Re: patch: garbage error strings in libpq

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: patch: garbage error strings in libpq
Дата
Msg-id 25975.1120659771@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: patch: garbage error strings in libpq  (Neil Conway <neilc@samurai.com>)
Ответы Re: patch: garbage error strings in libpq
Список pgsql-patches
Neil Conway <neilc@samurai.com> writes:
> I think you're missing the point. Obviously the current code is wrong,
> the debate is over the best way to fix it. Jeroen's interpretation of
> the spec suggests that merely having libpq_gettext() preserve errno is
> not sufficient. I'm not convinced this his interpretation is correct,
> but it is a question worth resolving.

(1) The fact that gettext works at all seems to me to be sufficient
empirical evidence that it's a working solution.  (2) Whether there are
sequence points in the function call or not, there most certainly are
sequence points inside each called function.  The spec allows the
functions involved to be called in an unspecified order, but it doesn't
allow the compiler to interleave the execution of several functions.
(3) Interpretation or not, the approach that Jeroen proposes is
unmaintainable; people will not remember to use such a kluge everywhere
they'd need to.  I'd much rather fix it in one place and do whatever we
have to do to keep the compiler from breaking that one place.

            regards, tom lane

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

Предыдущее
От: Neil Conway
Дата:
Сообщение: Re: patch: garbage error strings in libpq
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Disable page writes when fsync off, add GUC