PostgreSQL Source Code  git master
pg_collation.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * pg_collation.h
4  * definition of the "collation" system catalog (pg_collation)
5  *
6  *
7  * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * src/include/catalog/pg_collation.h
11  *
12  * NOTES
13  * The Catalog.pm module reads this file and derives schema
14  * information.
15  *
16  *-------------------------------------------------------------------------
17  */
18 #ifndef PG_COLLATION_H
19 #define PG_COLLATION_H
20 
21 #include "catalog/genbki.h"
22 #include "catalog/pg_collation_d.h"
23 
24 /* ----------------
25  * pg_collation definition. cpp turns this into
26  * typedef struct FormData_pg_collation
27  * ----------------
28  */
29 CATALOG(pg_collation,3456,CollationRelationId)
30 {
31  NameData collname; /* collation name */
32  Oid collnamespace; /* OID of namespace containing collation */
33  Oid collowner; /* owner of collation */
34  char collprovider; /* see constants below */
35  int32 collencoding; /* encoding for this collation; -1 = "all" */
36  NameData collcollate; /* LC_COLLATE setting */
37  NameData collctype; /* LC_CTYPE setting */
38 #ifdef CATALOG_VARLEN /* variable-length fields start here */
39  text collversion; /* provider-dependent version of collation
40  * data */
41 #endif
43 
44 /* ----------------
45  * Form_pg_collation corresponds to a pointer to a row with
46  * the format of pg_collation relation.
47  * ----------------
48  */
50 
51 #ifdef EXPOSE_TO_CLIENT_CODE
52 
53 #define COLLPROVIDER_DEFAULT 'd'
54 #define COLLPROVIDER_ICU 'i'
55 #define COLLPROVIDER_LIBC 'c'
56 
57 #endif /* EXPOSE_TO_CLIENT_CODE */
58 
59 
60 extern Oid CollationCreate(const char *collname, Oid collnamespace,
61  Oid collowner,
62  char collprovider,
63  int32 collencoding,
64  const char *collcollate, const char *collctype,
65  const char *collversion,
66  bool if_not_exists,
67  bool quiet);
68 extern void RemoveCollationById(Oid collationOid);
69 
70 #endif /* PG_COLLATION_H */
unsigned int Oid
Definition: postgres_ext.h:31
signed int int32
Definition: c.h:313
Definition: c.h:570
Oid CollationCreate(const char *collname, Oid collnamespace, Oid collowner, char collprovider, int32 collencoding, const char *collcollate, const char *collctype, const char *collversion, bool if_not_exists, bool quiet)
Definition: pg_collation.c:46
FormData_pg_collation
Definition: pg_collation.h:42
void RemoveCollationById(Oid collationOid)
Definition: pg_collation.c:210
FormData_pg_collation * Form_pg_collation
Definition: pg_collation.h:49
CATALOG(pg_collation, 3456, CollationRelationId)
Definition: pg_collation.h:29
Definition: c.h:516