static void
setup_collation(FILE *cmdfd)
{
- /*
- * Add SQL-standard names. We don't want to pin these, so they don't go
- * in pg_collation.dat. But add them before reading system collations, so
- * that they win if libc defines a locale with the same name.
- */
- PG_CMD_PRINTF("INSERT INTO pg_collation (oid, collname, collnamespace, collowner, collprovider, collisdeterministic, collencoding, colliculocale)"
- "VALUES (pg_nextoid('pg_catalog.pg_collation', 'oid', 'pg_catalog.pg_collation_oid_index'), 'unicode', 'pg_catalog'::regnamespace, %u, '%c', true, -1, 'und');\n\n",
- BOOTSTRAP_SUPERUSERID, COLLPROVIDER_ICU);
-
- PG_CMD_PRINTF("INSERT INTO pg_collation (oid, collname, collnamespace, collowner, collprovider, collisdeterministic, collencoding, collcollate, collctype)"
- "VALUES (pg_nextoid('pg_catalog.pg_collation', 'oid', 'pg_catalog.pg_collation_oid_index'), 'ucs_basic', 'pg_catalog'::regnamespace, %u, '%c', true, %d, 'C', 'C');\n\n",
- BOOTSTRAP_SUPERUSERID, COLLPROVIDER_LIBC, PG_UTF8);
-
- /* Now import all collations we can find in the operating system */
+ /* Import all collations we can find in the operating system */
PG_CMD_PUTS("SELECT pg_import_system_collations('pg_catalog');\n\n");
}
descr => 'standard POSIX collation',
collname => 'POSIX', collprovider => 'c', collencoding => '-1',
collcollate => 'POSIX', collctype => 'POSIX' },
+{ oid => '962', descr => 'sorts by Unicode code point',
+ collname => 'ucs_basic', collprovider => 'c', collencoding => '6',
+ collcollate => 'C', collctype => 'C' },
+{ oid => '963',
+ descr => 'sorts using the Unicode Collation Algorithm with default settings',
+ collname => 'unicode', collprovider => 'i', collencoding => '-1',
+ colliculocale => 'und' },
]