1/*-------------------------------------------------------------------------
4 * definition of the "collation" system catalog (pg_collation)
7 * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * src/include/catalog/pg_collation.h
13 * The Catalog.pm module reads this file and derives schema
16 *-------------------------------------------------------------------------
22#include "catalog/pg_collation_d.h" /* IWYU pragma: export */
25 * pg_collation definition. cpp turns this into
26 * typedef struct FormData_pg_collation
29 CATALOG(pg_collation,3456,CollationRelationId)
32 NameData collname;
/* collation name */
34 /* OID of namespace containing this collation */
37 /* owner of collation */
39 char collprovider;
/* see constants below */
41 int32 collencoding;
/* encoding for this collation; -1 = "all" */
42#ifdef CATALOG_VARLEN /* variable-length fields start here */
48 * version of collation
54 * Form_pg_collation corresponds to a pointer to a row with
55 * the format of pg_collation relation.
62 DECLARE_UNIQUE_INDEX(pg_collation_name_enc_nsp_index, 3164, CollationNameEncNspIndexId, pg_collation, btree(collname name_ops, collencoding int4_ops, collnamespace oid_ops));
68#ifdef EXPOSE_TO_CLIENT_CODE
70#define COLLPROVIDER_DEFAULT 'd'
71#define COLLPROVIDER_BUILTIN 'b'
72#define COLLPROVIDER_ICU 'i'
73#define COLLPROVIDER_LIBC 'c'
75static inline const char *
76collprovider_name(
char c)
80 case COLLPROVIDER_BUILTIN:
82 case COLLPROVIDER_ICU:
84 case COLLPROVIDER_LIBC:
91#endif /* EXPOSE_TO_CLIENT_CODE */
97 bool collisdeterministic,
99 const char *collcollate,
const char *collctype,
100 const char *colllocale,
101 const char *collicurules,
102 const char *collversion,
106#endif /* PG_COLLATION_H */
#define BKI_LOOKUP(catalog)
#define BKI_DEFAULT(value)
DECLARE_UNIQUE_INDEX(pg_collation_name_enc_nsp_index, 3164, CollationNameEncNspIndexId, pg_collation, btree(collname name_ops, collencoding int4_ops, collnamespace oid_ops))
FormData_pg_collation * Form_pg_collation
CATALOG(pg_collation, 3456, CollationRelationId)
DECLARE_TOAST(pg_collation, 6175, 6176)
MAKE_SYSCACHE(COLLNAMEENCNSP, pg_collation_name_enc_nsp_index, 8)
DECLARE_UNIQUE_INDEX_PKEY(pg_collation_oid_index, 3085, CollationOidIndexId, pg_collation, btree(oid oid_ops))
Oid CollationCreate(const char *collname, Oid collnamespace, Oid collowner, char collprovider, bool collisdeterministic, int32 collencoding, const char *collcollate, const char *collctype, const char *colllocale, const char *collicurules, const char *collversion, bool if_not_exists, bool quiet)