BUG #17170: Invalid collation created with provider icu and initdb' locale C
The Post Office <noreply@postgresql.org>
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: andrewbille@gmail.com
Date: 2021-08-31T07:15:54Z
Lists: pgsql-bugs
The following bug has been logged on the website:
Bug reference: 17170
Logged by: Andrew Bille
Email address: andrewbille@gmail.com
PostgreSQL version: 14beta3
Operating system: centos-7
Description:
Hi!
When using postgres built "--with-icu" I get an invalid collation with the
following script:
initdb -D db --locale=C
createdb testdb
psql testdb -c "CREATE COLLATION test (provider=icu,
locale='en_US.utf8');"
psql testdb -c "SELECT 'a' < 'b' COLLATE test;"
ERROR: collation "test" for encoding "SQL_ASCII" does not exist
LINE 1: SELECT 'a' < 'b' COLLATE test;
^
or
psql testdb -c "DROP COLLATION test;"
ERROR: collation "test" for encoding "SQL_ASCII" does not exist
Reproduced on REL_10_STABLE..REL_14_STABLE.
Thanks!
Commits
-
Disallow creating an ICU collation if the DB encoding won't support it.
- 2cc018ba8f80 14.0 landed
- db2760a84191 15.0 landed
- 9ebe2852e543 11.14 landed
- 9046a05368de 12.9 landed
- 5d7c6b6c8b4a 10.19 landed
- 132be60006b3 13.5 landed