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 system "collation" relation (pg_collation)
5  * along with the relation's initial contents.
6  *
7  *
8  * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
9  * Portions Copyright (c) 1994, Regents of the University of California
10  *
11  * IDENTIFICATION
12  * src/include/catalog/pg_collation.h
13  *
14  * NOTES
15  * the genbki.pl script reads this file and generates .bki
16  * information from the DATA() statements.
17  *
18  *-------------------------------------------------------------------------
19  */
20 #ifndef PG_COLLATION_H
21 #define PG_COLLATION_H
22 
23 #include "catalog/genbki.h"
24 
25 /* ----------------
26  * pg_collation definition. cpp turns this into
27  * typedef struct FormData_pg_collation
28  * ----------------
29  */
30 #define CollationRelationId 3456
31 
32 CATALOG(pg_collation,3456)
33 {
34  NameData collname; /* collation name */
35  Oid collnamespace; /* OID of namespace containing collation */
36  Oid collowner; /* owner of collation */
37  char collprovider; /* see constants below */
38  int32 collencoding; /* encoding for this collation; -1 = "all" */
39  NameData collcollate; /* LC_COLLATE setting */
40  NameData collctype; /* LC_CTYPE setting */
41 #ifdef CATALOG_VARLEN /* variable-length fields start here */
42  text collversion; /* provider-dependent version of collation
43  * data */
44 #endif
46 
47 /* ----------------
48  * Form_pg_collation corresponds to a pointer to a row with
49  * the format of pg_collation relation.
50  * ----------------
51  */
53 
54 /* ----------------
55  * compiler constants for pg_collation
56  * ----------------
57  */
58 #define Natts_pg_collation 8
59 #define Anum_pg_collation_collname 1
60 #define Anum_pg_collation_collnamespace 2
61 #define Anum_pg_collation_collowner 3
62 #define Anum_pg_collation_collprovider 4
63 #define Anum_pg_collation_collencoding 5
64 #define Anum_pg_collation_collcollate 6
65 #define Anum_pg_collation_collctype 7
66 #define Anum_pg_collation_collversion 8
67 
68 /* ----------------
69  * initial contents of pg_collation
70  * ----------------
71  */
72 
73 DATA(insert OID = 100 ( default PGNSP PGUID d -1 "" "" _null_ ));
74 DESCR("database's default collation");
75 #define DEFAULT_COLLATION_OID 100
76 DATA(insert OID = 950 ( C PGNSP PGUID c -1 "C" "C" _null_ ));
77 DESCR("standard C collation");
78 #define C_COLLATION_OID 950
79 DATA(insert OID = 951 ( POSIX PGNSP PGUID c -1 "POSIX" "POSIX" _null_ ));
80 DESCR("standard POSIX collation");
81 #define POSIX_COLLATION_OID 951
82 
83 
84 #define COLLPROVIDER_DEFAULT 'd'
85 #define COLLPROVIDER_ICU 'i'
86 #define COLLPROVIDER_LIBC 'c'
87 
88 #endif /* PG_COLLATION_H */
DATA(insert OID=100(default PGNSP PGUID d -1 "" "" _null_))
DESCR("database's default collation")
unsigned int Oid
Definition: postgres_ext.h:31
signed int int32
Definition: c.h:294
Definition: c.h:551
char * c
FormData_pg_collation
Definition: pg_collation.h:45
FormData_pg_collation * Form_pg_collation
Definition: pg_collation.h:52
Definition: c.h:497
CATALOG(pg_collation, 3456)
Definition: pg_collation.h:32