2011-02-08 22:04:18 +01:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
|
|
|
* pg_collation.h
|
|
|
|
* definition of the system "collation" relation (pg_collation)
|
|
|
|
* along with the relation's initial contents.
|
|
|
|
*
|
|
|
|
*
|
2017-01-03 19:48:53 +01:00
|
|
|
* Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
|
2011-02-08 22:04:18 +01:00
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
|
|
|
*
|
2011-03-10 07:05:33 +01:00
|
|
|
* IDENTIFICATION
|
|
|
|
* src/include/catalog/pg_collation.h
|
2011-02-08 22:04:18 +01:00
|
|
|
*
|
|
|
|
* NOTES
|
|
|
|
* the genbki.pl script reads this file and generates .bki
|
|
|
|
* information from the DATA() statements.
|
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
#ifndef PG_COLLATION_H
|
|
|
|
#define PG_COLLATION_H
|
|
|
|
|
|
|
|
#include "catalog/genbki.h"
|
|
|
|
|
|
|
|
/* ----------------
|
|
|
|
* pg_collation definition. cpp turns this into
|
|
|
|
* typedef struct FormData_pg_collation
|
|
|
|
* ----------------
|
|
|
|
*/
|
|
|
|
#define CollationRelationId 3456
|
|
|
|
|
|
|
|
CATALOG(pg_collation,3456)
|
|
|
|
{
|
|
|
|
NameData collname; /* collation name */
|
2011-03-11 19:20:11 +01:00
|
|
|
Oid collnamespace; /* OID of namespace containing collation */
|
|
|
|
Oid collowner; /* owner of collation */
|
2017-03-23 20:25:34 +01:00
|
|
|
char collprovider; /* see constants below */
|
2012-06-25 00:51:46 +02:00
|
|
|
int32 collencoding; /* encoding for this collation; -1 = "all" */
|
2011-02-08 22:04:18 +01:00
|
|
|
NameData collcollate; /* LC_COLLATE setting */
|
|
|
|
NameData collctype; /* LC_CTYPE setting */
|
2017-03-23 20:25:34 +01:00
|
|
|
#ifdef CATALOG_VARLEN /* variable-length fields start here */
|
2017-05-17 22:31:56 +02:00
|
|
|
text collversion; /* provider-dependent version of collation
|
|
|
|
* data */
|
2017-03-23 20:25:34 +01:00
|
|
|
#endif
|
2011-02-08 22:04:18 +01:00
|
|
|
} FormData_pg_collation;
|
|
|
|
|
|
|
|
/* ----------------
|
|
|
|
* Form_pg_collation corresponds to a pointer to a row with
|
|
|
|
* the format of pg_collation relation.
|
|
|
|
* ----------------
|
|
|
|
*/
|
|
|
|
typedef FormData_pg_collation *Form_pg_collation;
|
|
|
|
|
|
|
|
/* ----------------
|
|
|
|
* compiler constants for pg_collation
|
|
|
|
* ----------------
|
|
|
|
*/
|
2017-03-23 20:25:34 +01:00
|
|
|
#define Natts_pg_collation 8
|
2011-02-08 22:04:18 +01:00
|
|
|
#define Anum_pg_collation_collname 1
|
2011-04-10 17:42:00 +02:00
|
|
|
#define Anum_pg_collation_collnamespace 2
|
2011-02-12 14:54:13 +01:00
|
|
|
#define Anum_pg_collation_collowner 3
|
2017-03-23 20:25:34 +01:00
|
|
|
#define Anum_pg_collation_collprovider 4
|
|
|
|
#define Anum_pg_collation_collencoding 5
|
|
|
|
#define Anum_pg_collation_collcollate 6
|
|
|
|
#define Anum_pg_collation_collctype 7
|
|
|
|
#define Anum_pg_collation_collversion 8
|
2011-02-08 22:04:18 +01:00
|
|
|
|
2011-03-20 17:43:39 +01:00
|
|
|
/* ----------------
|
|
|
|
* initial contents of pg_collation
|
|
|
|
* ----------------
|
|
|
|
*/
|
|
|
|
|
2017-06-13 14:55:09 +02:00
|
|
|
DATA(insert OID = 100 ( default PGNSP PGUID d -1 "" "" _null_ ));
|
2011-03-11 19:20:11 +01:00
|
|
|
DESCR("database's default collation");
|
2011-03-20 17:43:39 +01:00
|
|
|
#define DEFAULT_COLLATION_OID 100
|
2017-06-13 14:55:09 +02:00
|
|
|
DATA(insert OID = 950 ( C PGNSP PGUID c -1 "C" "C" _null_ ));
|
2011-03-20 17:43:39 +01:00
|
|
|
DESCR("standard C collation");
|
|
|
|
#define C_COLLATION_OID 950
|
2017-06-13 14:55:09 +02:00
|
|
|
DATA(insert OID = 951 ( POSIX PGNSP PGUID c -1 "POSIX" "POSIX" _null_ ));
|
2011-03-20 17:43:39 +01:00
|
|
|
DESCR("standard POSIX collation");
|
|
|
|
#define POSIX_COLLATION_OID 951
|
2011-02-08 22:04:18 +01:00
|
|
|
|
2017-03-23 20:25:34 +01:00
|
|
|
|
|
|
|
#define COLLPROVIDER_DEFAULT 'd'
|
|
|
|
#define COLLPROVIDER_ICU 'i'
|
|
|
|
#define COLLPROVIDER_LIBC 'c'
|
|
|
|
|
2011-02-08 22:04:18 +01:00
|
|
|
#endif /* PG_COLLATION_H */
|