| From: | Jeff Davis <pgsql(at)j-davis(dot)com> | 
|---|---|
| To: | Alexander Lakhin <exclusion(at)gmail(dot)com>, Noah Misch <noah(at)leadboat(dot)com>, Andres Freund <andres(at)anarazel(dot)de> | 
| Cc: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> | 
| Subject: | Re: broken master regress tests | 
| Date: | 2023-12-28 17:36:42 | 
| Message-ID: | daa2d17d5544e0f75ea05b1024c9feec74b46c12.camel@j-davis.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 2023-12-28 17:37:16 | Re: Statistics Import and Export | 
| Previous Message | Peter Geoghegan | 2023-12-28 17:28:32 | Re: Optimizing nbtree ScalarArrayOp execution, allowing multi-column ordered scans, skip scan |