mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +03:00
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
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user