1 /*-------------------------------------------------------------------------
2  *
3  * pg_class_d.h
4  *    Macro definitions for pg_class
5  *
6  * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group
7  * Portions Copyright (c) 1994, Regents of the University of California
8  *
9  * NOTES
10  *  ******************************
11  *  *** DO NOT EDIT THIS FILE! ***
12  *  ******************************
13  *
14  *  It has been GENERATED by src/backend/catalog/genbki.pl
15  *
16  *-------------------------------------------------------------------------
17  */
18 #ifndef PG_CLASS_D_H
19 #define PG_CLASS_D_H
20 
21 #define RelationRelationId 1259
22 #define RelationRelation_Rowtype_Id 83
23 
24 #define Anum_pg_class_oid 1
25 #define Anum_pg_class_relname 2
26 #define Anum_pg_class_relnamespace 3
27 #define Anum_pg_class_reltype 4
28 #define Anum_pg_class_reloftype 5
29 #define Anum_pg_class_relowner 6
30 #define Anum_pg_class_relam 7
31 #define Anum_pg_class_relfilenode 8
32 #define Anum_pg_class_reltablespace 9
33 #define Anum_pg_class_relpages 10
34 #define Anum_pg_class_reltuples 11
35 #define Anum_pg_class_relallvisible 12
36 #define Anum_pg_class_reltoastrelid 13
37 #define Anum_pg_class_relhasindex 14
38 #define Anum_pg_class_relisshared 15
39 #define Anum_pg_class_relpersistence 16
40 #define Anum_pg_class_relkind 17
41 #define Anum_pg_class_relnatts 18
42 #define Anum_pg_class_relchecks 19
43 #define Anum_pg_class_relhasrules 20
44 #define Anum_pg_class_relhastriggers 21
45 #define Anum_pg_class_relhassubclass 22
46 #define Anum_pg_class_relrowsecurity 23
47 #define Anum_pg_class_relforcerowsecurity 24
48 #define Anum_pg_class_relispopulated 25
49 #define Anum_pg_class_relreplident 26
50 #define Anum_pg_class_relispartition 27
51 #define Anum_pg_class_relrewrite 28
52 #define Anum_pg_class_relfrozenxid 29
53 #define Anum_pg_class_relminmxid 30
54 #define Anum_pg_class_relacl 31
55 #define Anum_pg_class_reloptions 32
56 #define Anum_pg_class_relpartbound 33
57 
58 #define Natts_pg_class 33
59 
60 
61 #define		  RELKIND_RELATION		  'r'	/* ordinary table */
62 #define		  RELKIND_INDEX			  'i'	/* secondary index */
63 #define		  RELKIND_SEQUENCE		  'S'	/* sequence object */
64 #define		  RELKIND_TOASTVALUE	  't'	/* for out-of-line values */
65 #define		  RELKIND_VIEW			  'v'	/* view */
66 #define		  RELKIND_MATVIEW		  'm'	/* materialized view */
67 #define		  RELKIND_COMPOSITE_TYPE  'c'	/* composite type */
68 #define		  RELKIND_FOREIGN_TABLE   'f'	/* foreign table */
69 #define		  RELKIND_PARTITIONED_TABLE 'p' /* partitioned table */
70 #define		  RELKIND_PARTITIONED_INDEX 'I' /* partitioned index */
71 
72 #define		  RELPERSISTENCE_PERMANENT	'p' /* regular table */
73 #define		  RELPERSISTENCE_UNLOGGED	'u' /* unlogged permanent table */
74 #define		  RELPERSISTENCE_TEMP		't' /* temporary table */
75 
76 /* default selection for replica identity (primary key or nothing) */
77 #define		  REPLICA_IDENTITY_DEFAULT	'd'
78 /* no replica identity is logged for this relation */
79 #define		  REPLICA_IDENTITY_NOTHING	'n'
80 /* all columns are logged as replica identity */
81 #define		  REPLICA_IDENTITY_FULL		'f'
82 /*
83  * an explicitly chosen candidate key's columns are used as replica identity.
84  * Note this will still be set if the index has been dropped; in that case it
85  * has the same meaning as 'd'.
86  */
87 #define		  REPLICA_IDENTITY_INDEX	'i'
88 
89 /*
90  * Relation kinds that have physical storage. These relations normally have
91  * relfilenode set to non-zero, but it can also be zero if the relation is
92  * mapped.
93  */
94 #define RELKIND_HAS_STORAGE(relkind) \
95 	((relkind) == RELKIND_RELATION || \
96 	 (relkind) == RELKIND_INDEX || \
97 	 (relkind) == RELKIND_SEQUENCE || \
98 	 (relkind) == RELKIND_TOASTVALUE || \
99 	 (relkind) == RELKIND_MATVIEW)
100 
101 
102 
103 #endif							/* PG_CLASS_D_H */
104