From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: what to do about unsupported encodings |
Date: | 2016-10-27 05:37:08 |
Message-ID: | CAB7nPqS0LObthaH3U_aSNt0jtPd5x1XmALKJNw4H=R0s991KZA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Oct 27, 2016 at 2:01 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Slightly related: there are some callers such as PGLC_localeconv that
> aren't checking for a failure return. Seems bad.
And also related to the patch trying to improve OOM handling in
pg_locale.c, the point being that elog() cannot be called as long as
the saved locales are not put back in place. The cleanest fix here
would be to use a goto to take the code past restoring the saved
locales, and then issue and ERROR. I think that it would be better to
hit those two stones at once on the other thread.
For the calls in fe-connect.c, why are the calls of
pg_get_encoding_from_locale() requesting to print a message on error?
Shouldn't the caller request to *not* print an error instead and then
store an error string in conn->errorMessage if the encoding is < 0? It
seems to me that at the end the right call is to just remove
write_message all together and let the caller decide the error message
it wants. For HEAD that would be a fine cleanup to do. A patch does
not look that complicated, I could get one out according to those
lines.
Thoughts?
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | amul sul | 2016-10-27 06:11:07 | Query regarding selectDumpableExtension() |
Previous Message | Michael Paquier | 2016-10-27 04:32:09 | Re: [BUG] pg_basebackup from disconnected standby fails |