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-2016, 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 	int32		collencoding;	/* encoding for this collation; -1 = "all" */
38 	NameData	collcollate;	/* LC_COLLATE setting */
39 	NameData	collctype;		/* LC_CTYPE setting */
40 } FormData_pg_collation;
41 
42 /* ----------------
43  *		Form_pg_collation corresponds to a pointer to a row with
44  *		the format of pg_collation relation.
45  * ----------------
46  */
47 typedef FormData_pg_collation *Form_pg_collation;
48 
49 /* ----------------
50  *		compiler constants for pg_collation
51  * ----------------
52  */
53 #define Natts_pg_collation				6
54 #define Anum_pg_collation_collname		1
55 #define Anum_pg_collation_collnamespace 2
56 #define Anum_pg_collation_collowner		3
57 #define Anum_pg_collation_collencoding	4
58 #define Anum_pg_collation_collcollate	5
59 #define Anum_pg_collation_collctype		6
60 
61 /* ----------------
62  *		initial contents of pg_collation
63  * ----------------
64  */
65 
66 DATA(insert OID = 100 ( default		PGNSP PGUID -1 "" "" ));
67 DESCR("database's default collation");
68 #define DEFAULT_COLLATION_OID	100
69 DATA(insert OID = 950 ( C			PGNSP PGUID -1 "C" "C" ));
70 DESCR("standard C collation");
71 #define C_COLLATION_OID			950
72 DATA(insert OID = 951 ( POSIX		PGNSP PGUID -1 "POSIX" "POSIX" ));
73 DESCR("standard POSIX collation");
74 #define POSIX_COLLATION_OID		951
75 
76 #endif   /* PG_COLLATION_H */
77