Re: pgsql: createdb: Fix quoting of --encoding, --lc-ctype and --lc-collate

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-committers <pgsql-committers(at)lists(dot)postgresql(dot)org>
Subject: Re: pgsql: createdb: Fix quoting of --encoding, --lc-ctype and --lc-collate
Date: 2021-01-08 01:48:09
Message-ID: X/e52YP5b2XXYBhf@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Thu, Jan 07, 2021 at 05:25:24PM -0500, Tom Lane wrote:
> So on this machine, setlocale() is lax about LC_COLLATE values as
> well as (presumably) LC_CTYPE. Question then becomes why we did
> not notice for nearly a year. It looks like, of the not-very-many
> OpenBSD machines in the buildfarm, the only one running the TAP
> tests is curculio, and that's running OpenBSD 5.9 which is quite old.
> Comparing their setlocale(3) man pages for different versions, it
> looks like the current verbiage appeared in 6.3; older versions
> have text similar to other BSDen. So it looks like they actually
> ripped out a lot of locale functionality in 6.3.

Indeed. 6.3 is the point where they began ignoring LC_COLLATE, and
the buildfarm has no coverage for it. Here is the reference in the
upstream doc for others:
https://man.openbsd.org/OpenBSD-6.3/setlocale.3
https://man.openbsd.org/OpenBSD-6.2/setlocale.3

> It seems like (1) we need to drop the --lc-collate version of this
> test too, or else adjust both tests to accept the error we get on
> OpenBSD as well as the normal error; (2) somebody really ought to
> crank up a modern OpenBSD critter that's running the TAP tests.

Using an alternate output looks adapted to me. Thanks for 9ffe227.
--
Michael

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2021-01-08 17:16:20 pgsql: Fix ancient bug in parsing of BRE-mode regular expressions.
Previous Message Michael Paquier 2021-01-08 01:37:59 pgsql: Fix and simplify some code related to cryptohashes