pg_collation.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. #include "catalog/genbki.h"
  23. /* ----------------
  24. * pg_collation definition. cpp turns this into
  25. * typedef struct FormData_pg_collation
  26. * ----------------
  27. */
  28. #define CollationRelationId 3456
  29. CATALOG(pg_collation,3456)
  30. {
  31. NameData collname; /* collation name */
  32. Oid collnamespace; /* OID of namespace containing collation */
  33. Oid collowner; /* owner of collation */
  34. int32 collencoding; /* encoding for this collation; -1 = "all" */
  35. NameData collcollate; /* LC_COLLATE setting */
  36. NameData collctype; /* LC_CTYPE setting */
  37. } FormData_pg_collation;
  38. /* ----------------
  39. * Form_pg_collation corresponds to a pointer to a row with
  40. * the format of pg_collation relation.
  41. * ----------------
  42. */
  43. typedef FormData_pg_collation *Form_pg_collation;
  44. /* ----------------
  45. * compiler constants for pg_collation
  46. * ----------------
  47. */
  48. #define Natts_pg_collation 6
  49. #define Anum_pg_collation_collname 1
  50. #define Anum_pg_collation_collnamespace 2
  51. #define Anum_pg_collation_collowner 3
  52. #define Anum_pg_collation_collencoding 4
  53. #define Anum_pg_collation_collcollate 5
  54. #define Anum_pg_collation_collctype 6
  55. /* ----------------
  56. * initial contents of pg_collation
  57. * ----------------
  58. */
  59. DATA(insert OID = 100 ( default PGNSP PGUID -1 "" "" ));
  60. DESCR("database's default collation");
  61. #define DEFAULT_COLLATION_OID 100
  62. DATA(insert OID = 950 ( C PGNSP PGUID -1 "C" "C" ));
  63. DESCR("standard C collation");
  64. #define C_COLLATION_OID 950
  65. DATA(insert OID = 951 ( POSIX PGNSP PGUID -1 "POSIX" "POSIX" ));
  66. DESCR("standard POSIX collation");
  67. #define POSIX_COLLATION_OID 951
  68. #endif /* PG_COLLATION_H */