From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Neil Conway <neilc(at)samurai(dot)com> |
Cc: | jtv(at)xs4all(dot)nl, pgsql-patches(at)postgresql(dot)org |
Subject: | Re: patch: garbage error strings in libpq |
Date: | 2005-07-06 14:22:51 |
Message-ID: | 25975.1120659771@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
Neil Conway <neilc(at)samurai(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2005-07-06 14:45:13 | Re: Disable page writes when fsync off, add GUC |
Previous Message | Neil Conway | 2005-07-06 14:08:45 | Re: patch: garbage error strings in libpq |