pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff Davis <pgsql@j-davis.com>
To: Alexander Lakhin <exclusion@gmail.com>
To: Noah Misch <noah@leadboat.com>
To: Andres Freund <andres@anarazel.de>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Thomas Munro <thomas.munro@gmail.com>
Cc: Pavel Stehule <pavel.stehule@gmail.com>
Cc: Matthias van de Meent <boekewurm+postgres@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: broken master regress tests
Date: Thu, 28 Dec 2023 09:36:42 -0800
Message-ID: <daa2d17d5544e0f75ea05b1024c9feec74b46c12.camel@j-davis.com> (raw)
In-Reply-To: <ae73f6f5-8221-c112-4640-5cda812a69de@gmail.com>
References: <CA+hUKG+VkcevnqLmbZSD4C5hJ3=TQWgMP-th8LqsbNt0TqZfqw@mail.gmail.com>
	<20230829155424.bem25upvaefkqqyy@alvherre.pgsql>
	<20230912022358.d5ln25sglrntwaia@awork3.anarazel.de>
	<0d47e5ecc037b3908149aad5f2a987793cf938bd.camel@j-davis.com>
	<20231011005434.34oc4v4pv6ajqkss@awork3.anarazel.de>
	<20231213025619.70.nmisch@google.com>
	<97c9d15247c5919b444b2e217b4c886271be0ea5.camel@j-davis.com>
	<c6571aac4c6da3e2f013fe74fcc95d6e052bf04c.camel@j-davis.com>
	<ae73f6f5-8221-c112-4640-5cda812a69de@gmail.com>

On Thu, 2023-12-28 at 18:00 +0300, Alexander Lakhin wrote:
> AFAICS, before that commit SELECT getdatabaseencoding() in the test
> returned SQL_ASCII, hence the test was essentially skipped, but now
> it
> returns WIN1252, so problematic CREATE COLLATION(locale = 'en_US',
> ...)
> is reached.

We do want that test to run though, right?

I suspect that test line never worked reliably. The skip_test check at
the top guarantees that the collation named "en_US" exists, but that
doesn't mean that the OS understands the locale 'en_US'.

Perhaps we can change that line to use a similar trick as what's used
elsewhere in the file:

  do $$
  BEGIN
    EXECUTE 'CREATE COLLATION ctest_det (locale = ' ||
            quote_literal((SELECT collcollate FROM pg_collation WHERE
collname = ''en_US'')) || ', deterministic = true);';
  END
  $$;

The above may need some adjustment, but perhaps you can try it out?
Another option might be to use \gset to assign it to a variable, which
might be more readable, but I think it's better to just follow what the
rest of the file is doing.

Regards,
	Jeff Davis






view thread (24+ messages)  latest in thread

Message-ID: <daa2d17d5544e0f75ea05b1024c9feec74b46c12.camel@j-davis.com>
Permalink:  ../daa2d17d5544e0f75ea05b1024c9feec74b46c12.camel@j-davis.com/
Also on:    postgresql.org/message-id/daa2d17d5544e0f75ea05b1024c9feec74b46c12.camel@j-davis.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: pgsql@j-davis.com, exclusion@gmail.com, noah@leadboat.com, andres@anarazel.de, alvherre@alvh.no-ip.org, thomas.munro@gmail.com, pavel.stehule@gmail.com, boekewurm+postgres@gmail.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: broken master regress tests
  In-Reply-To: <daa2d17d5544e0f75ea05b1024c9feec74b46c12.camel@j-davis.com>

* 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