I am trying to set the collation on AWS Aurora Postgres 12 to a user defined collation type.
CREATE COLLATION ndcoll (provider = icu, locale = 'und', deterministic = false);
I am able to create the collation just fine. It ends up being entered into the pg_collations table.
However, when I go to try to create a database using this new user defined collation, I keep receiving the error SQL Error [42809]: ERROR: invalid locale name: "ndcoll"
This is the create database statement:
create database "foo" with template 'bar' lc_collate = "ndcoll";
I know there is also a way to set the collation at the server level using a custom parameter group. But the parameter group family I am using aurora-postgres 12 does not have a parameter available to set the collation. After creating my user defined collation, I restarted the Aurora server, but still cannot get the DB to recognize the locale. I might be not understanding locale and lc_collate as well. Maybe there is a misunderstanding on my end fundamentally.
Does anyone have any insight as to how I can use my user defined collation either 1) to create new databases using this user defined collation or 2) set the collation at the server level to a non-deterministic collation in the aurora-postgres12 parameter group family.
Thanks in advance!