diff options
author | Jeff Davis <jdavis@postgresql.org> | 2024-03-09 14:48:18 -0800 |
---|---|---|
committer | Jeff Davis <jdavis@postgresql.org> | 2024-03-09 14:48:18 -0800 |
commit | f696c0cd5f299f1b51e214efc55a22a782cc175d (patch) | |
tree | f834ff70d179f4d21f3def9ee8e4c4f1fe4922ad /src/backend/utils/init | |
parent | 81d13a8dc066e571dca032da0a5fc1d81214d2bb (diff) | |
download | postgresql-f696c0cd5f299f1b51e214efc55a22a782cc175d.tar.gz postgresql-f696c0cd5f299f1b51e214efc55a22a782cc175d.zip |
Catalog changes preparing for builtin collation provider.
Rename pg_collation.colliculocale to colllocale, and
pg_database.daticulocale to datlocale. These names reflects that the
fields will be useful for the upcoming builtin provider as well, not
just for ICU.
This is purely a rename; no changes to the meaning of the fields.
Discussion: https://postgr.es/m/ff4c2f2f9c8fc7ca27c1c24ae37ecaeaeaff6b53.camel%40j-davis.com
Reviewed-by: Peter Eisentraut
Diffstat (limited to 'src/backend/utils/init')
-rw-r--r-- | src/backend/utils/init/postinit.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/backend/utils/init/postinit.c b/src/backend/utils/init/postinit.c index 16f3659fd90..2875bc97d3b 100644 --- a/src/backend/utils/init/postinit.c +++ b/src/backend/utils/init/postinit.c @@ -318,7 +318,7 @@ CheckMyDatabase(const char *name, bool am_superuser, bool override_allow_connect bool isnull; char *collate; char *ctype; - char *iculocale; + char *datlocale; /* Fetch our pg_database row normally, via syscache */ tup = SearchSysCache1(DATABASEOID, ObjectIdGetDatum(MyDatabaseId)); @@ -427,8 +427,8 @@ CheckMyDatabase(const char *name, bool am_superuser, bool override_allow_connect { char *icurules; - datum = SysCacheGetAttrNotNull(DATABASEOID, tup, Anum_pg_database_daticulocale); - iculocale = TextDatumGetCString(datum); + datum = SysCacheGetAttrNotNull(DATABASEOID, tup, Anum_pg_database_datlocale); + datlocale = TextDatumGetCString(datum); datum = SysCacheGetAttr(DATABASEOID, tup, Anum_pg_database_daticurules, &isnull); if (!isnull) @@ -436,10 +436,10 @@ CheckMyDatabase(const char *name, bool am_superuser, bool override_allow_connect else icurules = NULL; - make_icu_collator(iculocale, icurules, &default_locale); + make_icu_collator(datlocale, icurules, &default_locale); } else - iculocale = NULL; + datlocale = NULL; default_locale.provider = dbform->datlocprovider; @@ -464,7 +464,7 @@ CheckMyDatabase(const char *name, bool am_superuser, bool override_allow_connect collversionstr = TextDatumGetCString(datum); - actual_versionstr = get_collation_actual_version(dbform->datlocprovider, dbform->datlocprovider == COLLPROVIDER_ICU ? iculocale : collate); + actual_versionstr = get_collation_actual_version(dbform->datlocprovider, dbform->datlocprovider == COLLPROVIDER_ICU ? datlocale : collate); if (!actual_versionstr) /* should not happen */ elog(WARNING, |