Re: Error handling fix in interfaces/libpq/fe-secure.c

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: jtv(at)xs4all(dot)nl
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Error handling fix in interfaces/libpq/fe-secure.c
Date: 2005-07-05 14:58:13
Message-ID: 13183.1120575493@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

BTW, I read at

http://www.gnu.org/software/libc/manual/html_node/Translation-with-gettext.html

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.

What you may actually be running into is the problem that there are two
different definitions of strerror_r() out there, the SUS spec and the
GNU spec, and pre-8.0 we failed to distinguish these. The 7.4 coding
will yield garbage messages in some cases when GNU strerror_r is in use.

regards, tom lane

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2005-07-05 15:40:11 Re: Python setof patch
Previous Message Michael Fuhr 2005-07-05 14:52:59 Re: Python setof patch