pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Try to deliver a sane message for _create_locale() failure on Wi
Date: Tue, 01 Aug 2017 20:11:56 +0000
Message-ID: <E1dcdWG-0003Iu-EV@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Try to deliver a sane message for _create_locale() failure on Windows.

We were just printing errno, which is certainly not gonna work on
Windows.  Now, it's not entirely clear from Microsoft's documentation
whether _create_locale() adheres to standard Windows error reporting
conventions, but let's assume it does and try to map the GetLastError
result to an errno.  If this turns out not to work, probably the best
thing to do will be to assume the error is always ENOENT on Windows.

This is a longstanding bug, but given the lack of previous field
complaints, I'm not excited about back-patching it.

Per report from Murtuza Zabuawala.

Discussion: https://postgr.es/m/CAKKotZS-wcDcofXDCH=sidiuajE+nqHn2CGjLLX78anyDmi3gQ@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1e165d05fe06a9072867607886f818bc255507db

Modified Files
--------------
src/backend/utils/adt/pg_locale.c     | 9 +++++++--
src/test/regress/expected/collate.out | 3 +++
src/test/regress/sql/collate.sql      | 1 +
3 files changed, 11 insertions(+), 2 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Message-ID: <E1dcdWG-0003Iu-EV@gemulon.postgresql.org>
Permalink:  ../E1dcdWG-0003Iu-EV@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1dcdWG-0003Iu-EV@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Try to deliver a sane message for _create_locale() failure on Wi
  In-Reply-To: <E1dcdWG-0003Iu-EV@gemulon.postgresql.org>
  References: <E1dcdWG-0003Iu-EV@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox