PG16: Fix flaky test

In PG16 new collations named `en_US` and `en-US` on Windows bootstrap
that are incompatible with UTF-8. So added the `collencoding` to the
order of the query that determine the collation name to get another
compatible collation.
This commit is contained in:
Fabrízio de Royes Mello 2023-11-08 14:03:31 -03:00
parent 9d4ffc94af
commit d602be4d81
2 changed files with 6 additions and 6 deletions

View File

@ -5,9 +5,9 @@
-- We have different collation names such as en_US, en-US-x-icu and so on,
-- that are available on different platforms.
select * from (
select 3 priority, 'en_US' "COLLATION"
union all (select 2, collname from pg_collation where collname ilike 'en_us%' order by collname limit 1)
union all (select 1, collname from pg_collation where collname ilike 'en_us_utf%8%' order by collname limit 1)
select 3 priority, 'C' "COLLATION"
union all (select 2, collname from pg_collation where collname ilike 'en_us%' order by collencoding, collname limit 1)
union all (select 1, collname from pg_collation where collname ilike 'en_us_utf%8%' order by collencoding, collname limit 1)
) c
order by priority limit 1 \gset
create table compressed_collation_ht(time timestamp, name text collate :"COLLATION",

View File

@ -7,9 +7,9 @@
-- We have different collation names such as en_US, en-US-x-icu and so on,
-- that are available on different platforms.
select * from (
select 3 priority, 'en_US' "COLLATION"
union all (select 2, collname from pg_collation where collname ilike 'en_us%' order by collname limit 1)
union all (select 1, collname from pg_collation where collname ilike 'en_us_utf%8%' order by collname limit 1)
select 3 priority, 'C' "COLLATION"
union all (select 2, collname from pg_collation where collname ilike 'en_us%' order by collencoding, collname limit 1)
union all (select 1, collname from pg_collation where collname ilike 'en_us_utf%8%' order by collencoding, collname limit 1)
) c
order by priority limit 1 \gset