pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-committers <pgsql-committers@lists.postgresql.org>
Subject: Re: pgsql: createdb: Fix quoting of --encoding, --lc-ctype and --lc-collate
Date: Thu, 07 Jan 2021 17:25:24 -0500
Message-ID: <231373.1610058324@sss.pgh.pa.us> (raw)
In-Reply-To: <20200227130127.GE403330@paquier.xyz>
References: <E1j78pp-0005GG-Ao@gemulon.postgresql.org>
	<CA+TgmoZ6ddh3mHD9gU8DvNYoFmuJaYYn1+4AvZNp25vTdRwCAQ@mail.gmail.com>
	<20200227051112.GA280980@paquier.xyz>
	<20200227130127.GE403330@paquier.xyz>

Michael Paquier <michael@paquier.xyz> writes:
> On Thu, Feb 27, 2020 at 02:11:12PM +0900, Michael Paquier wrote:
>> The best thing I can think of is just to remove the test case for
>> --lc-ctype.

> So, thinking about nothing better, I have just removed this test.

I just tried to run check-world on an OpenBSD 6.8 installation,
and look what I got:

t/020_createdb.pl ......... 14/19 
#   Failed test 'createdb with incorrect --lc-collate stderr /(?^s:^createdb: error: database creation failed: ERROR:  invalid locale name)/'
#   at t/020_createdb.pl line 35.
#                   'createdb: error: database creation failed: ERROR:  new collation (foo'; SELECT '1) is incompatible with the collation of the template database (C)
# HINT:  Use the same collation as in the template database, or use template0 as template.
# '
#     doesn't match '(?^s:^createdb: error: database creation failed: ERROR:  invalid locale name)'
# Looks like you failed 1 test of 19.
t/020_createdb.pl ......... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/19 subtests 

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.

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.

			regards, tom lane





view thread (12+ messages)  latest in thread

Message-ID: <231373.1610058324@sss.pgh.pa.us>
Permalink:  ../231373.1610058324@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/231373.1610058324@sss.pgh.pa.us

 · 

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, michael@paquier.xyz, robertmhaas@gmail.com
  Subject: Re: pgsql: createdb: Fix quoting of --encoding, --lc-ctype and --lc-collate
  In-Reply-To: <231373.1610058324@sss.pgh.pa.us>
  References: <E1j78pp-0005GG-Ao@gemulon.postgresql.org> <CA+TgmoZ6ddh3mHD9gU8DvNYoFmuJaYYn1+4AvZNp25vTdRwCAQ@mail.gmail.com> <20200227051112.GA280980@paquier.xyz> <20200227130127.GE403330@paquier.xyz> <231373.1610058324@sss.pgh.pa.us>

* 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