PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
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 data */
43 #endif
45 
46 /* ----------------
47  * Form_pg_collation corresponds to a pointer to a row with
48  * the format of pg_collation relation.
49  * ----------------
50  */
52 
53 /* ----------------
54  * compiler constants for pg_collation
55  * ----------------
56  */
57 #define Natts_pg_collation 8
58 #define Anum_pg_collation_collname 1
59 #define Anum_pg_collation_collnamespace 2
60 #define Anum_pg_collation_collowner 3
61 #define Anum_pg_collation_collprovider 4
62 #define Anum_pg_collation_collencoding 5
63 #define Anum_pg_collation_collcollate 6
64 #define Anum_pg_collation_collctype 7
65 #define Anum_pg_collation_collversion 8
66 
67 /* ----------------
68  * initial contents of pg_collation
69  * ----------------
70  */
71 
72 DATA(insert OID = 100 ( default PGNSP PGUID d -1 "" "" 0 ));
73 DESCR("database's default collation");
74 #define DEFAULT_COLLATION_OID 100
75 DATA(insert OID = 950 ( C PGNSP PGUID c -1 "C" "C" 0 ));
76 DESCR("standard C collation");
77 #define C_COLLATION_OID 950
78 DATA(insert OID = 951 ( POSIX PGNSP PGUID c -1 "POSIX" "POSIX" 0 ));
79 DESCR("standard POSIX collation");
80 #define POSIX_COLLATION_OID 951
81 
82 
83 #define COLLPROVIDER_DEFAULT 'd'
84 #define COLLPROVIDER_ICU 'i'
85 #define COLLPROVIDER_LIBC 'c'
86 
87 #endif /* PG_COLLATION_H */
DATA(insert OID=100(defaultPGNSP PGUID d-1""""0))
DESCR("database's default collation")
unsigned int Oid
Definition: postgres_ext.h:31
signed int int32
Definition: c.h:256
Definition: c.h:493
char * c
FormData_pg_collation
Definition: pg_collation.h:44
FormData_pg_collation * Form_pg_collation
Definition: pg_collation.h:51
Definition: c.h:439
CATALOG(pg_collation, 3456)
Definition: pg_collation.h:32