summaryrefslogtreecommitdiff
path: root/src/include/commands/collationcmds.h
diff options
context:
space:
mode:
authorPeter Eisentraut2017-03-23 19:25:34 +0000
committerPeter Eisentraut2017-03-23 19:28:48 +0000
commiteccfef81e1f73ee41f1d8bfe4fa4e80576945048 (patch)
tree52bd1b2468bcf9682b356cf5b5f6199ae9d80ee4 /src/include/commands/collationcmds.h
parentea42cc18c35381f639d45628d792e790ff39e271 (diff)
ICU support
Add a column collprovider to pg_collation that determines which library provides the collation data. The existing choices are default and libc, and this adds an icu choice, which uses the ICU4C library. The pg_locale_t type is changed to a union that contains the provider-specific locale handles. Users of locale information are changed to look into that struct for the appropriate handle to use. Also add a collversion column that records the version of the collation when it is created, and check at run time whether it is still the same. This detects potentially incompatible library upgrades that can corrupt indexes and other structures. This is currently only supported by ICU-provided collations. initdb initializes the default collation set as before from the `locale -a` output but also adds all available ICU locales with a "-x-icu" appended. Currently, ICU-provided collations can only be explicitly named collations. The global database locales are still always libc-provided. ICU support is enabled by configure --with-icu. Reviewed-by: Thomas Munro <[email protected]> Reviewed-by: Andreas Karlsson <[email protected]>
Diffstat (limited to 'src/include/commands/collationcmds.h')
-rw-r--r--src/include/commands/collationcmds.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/commands/collationcmds.h b/src/include/commands/collationcmds.h
index 3b2fcb82711..df5623ccb6d 100644
--- a/src/include/commands/collationcmds.h
+++ b/src/include/commands/collationcmds.h
@@ -20,5 +20,6 @@
extern ObjectAddress DefineCollation(ParseState *pstate, List *names, List *parameters, bool if_not_exists);
extern void IsThereCollationInNamespace(const char *collname, Oid nspOid);
+extern ObjectAddress AlterCollation(AlterCollationStmt *stmt);
#endif /* COLLATIONCMDS_H */