Currently, CREATE COLLATION always defaults the provider to libc.
The attached patch causes it to default to libc if LC_COLLATE/LC_CTYPE
are specified, otherwise default to the current database default
collation's provider.
That way, the provider choice at initdb time then becomes the default
for "CREATE DATABASE ... TEMPLATE template0", which then becomes the
default provider for "CREATE COLLATION (LOCALE='...')".
--
Jeff Davis
PostgreSQL Contributor Team - AWS