Skip to content

Commit

Permalink
PG16: Fix flaky test
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
fabriziomello committed Nov 8, 2023
1 parent 9d4ffc9 commit d602be4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions tsl/test/expected/compressed_collation.out
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions tsl/test/sql/compressed_collation.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit d602be4

Please sign in to comment.