Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite32701b

Browse files
committed
initdb: Set collversion for standard collation UNICODE
Since the behavior of the UNICODE collation can change with newICU/Unicode versions, we need to apply the versioning mechanism to it.We do this with an UPDATE command in initdb; this is similar to how weput the collation version into pg_database already.Reported-by: Daniel Verite <daniel@manitou-mail.org>Discussion:https://www.postgresql.org/message-id/49417853-7bdd-4b23-a4e9-04c7aff33821@manitou-mail.org
1 parentc8b881d commite32701b

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

‎src/bin/initdb/initdb.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1695,6 +1695,13 @@ setup_description(FILE *cmdfd)
16951695
staticvoid
16961696
setup_collation(FILE*cmdfd)
16971697
{
1698+
/*
1699+
* Set the collation version for collations defined in pg_collation.dat,
1700+
* but not the ones where we know that the collation behavior will never
1701+
* change.
1702+
*/
1703+
PG_CMD_PUTS("UPDATE pg_collation SET collversion = pg_collation_actual_version(oid) WHERE collname = 'unicode';\n\n");
1704+
16981705
/* Import all collations we can find in the operating system */
16991706
PG_CMD_PUTS("SELECT pg_import_system_collations('pg_catalog');\n\n");
17001707
}

‎src/include/catalog/catversion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@
5757
*/
5858

5959
/*yyyymmddN */
60-
#defineCATALOG_VERSION_NO202305041
60+
#defineCATALOG_VERSION_NO202305121
6161

6262
#endif

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp