22 #include "catalog/pg_class_d.h"
131 #ifdef CATALOG_VARLEN
145 #define CLASS_TUPLE_SIZE \
146 (offsetof(FormData_pg_class,relminmxid) + sizeof(TransactionId))
157 DECLARE_INDEX(pg_class_tblspc_relfilenode_index, 3455, ClassTblspcRelfilenodeIndexId, pg_class, btree(reltablespace oid_ops, relfilenode oid_ops));
162 #ifdef EXPOSE_TO_CLIENT_CODE
164 #define RELKIND_RELATION 'r'
165 #define RELKIND_INDEX 'i'
166 #define RELKIND_SEQUENCE 'S'
167 #define RELKIND_TOASTVALUE 't'
168 #define RELKIND_VIEW 'v'
169 #define RELKIND_MATVIEW 'm'
170 #define RELKIND_COMPOSITE_TYPE 'c'
171 #define RELKIND_FOREIGN_TABLE 'f'
172 #define RELKIND_PARTITIONED_TABLE 'p'
173 #define RELKIND_PARTITIONED_INDEX 'I'
175 #define RELPERSISTENCE_PERMANENT 'p'
176 #define RELPERSISTENCE_UNLOGGED 'u'
177 #define RELPERSISTENCE_TEMP 't'
180 #define REPLICA_IDENTITY_DEFAULT 'd'
182 #define REPLICA_IDENTITY_NOTHING 'n'
184 #define REPLICA_IDENTITY_FULL 'f'
190 #define REPLICA_IDENTITY_INDEX 'i'
197 #define RELKIND_HAS_STORAGE(relkind) \
198 ((relkind) == RELKIND_RELATION || \
199 (relkind) == RELKIND_INDEX || \
200 (relkind) == RELKIND_SEQUENCE || \
201 (relkind) == RELKIND_TOASTVALUE || \
202 (relkind) == RELKIND_MATVIEW)
204 #define RELKIND_HAS_PARTITIONS(relkind) \
205 ((relkind) == RELKIND_PARTITIONED_TABLE || \
206 (relkind) == RELKIND_PARTITIONED_INDEX)
215 #define RELKIND_HAS_TABLESPACE(relkind) \
216 ((RELKIND_HAS_STORAGE(relkind) || RELKIND_HAS_PARTITIONS(relkind)) \
217 && (relkind) != RELKIND_SEQUENCE)
226 #define RELKIND_HAS_TABLE_AM(relkind) \
227 ((relkind) == RELKIND_RELATION || \
228 (relkind) == RELKIND_TOASTVALUE || \
229 (relkind) == RELKIND_MATVIEW)
#define BKI_LOOKUP(catalog)
#define BKI_ROWTYPE_OID(oid, oidmacro)
int errdetail_relkind_not_supported(char relkind)
FormData_pg_class * Form_pg_class
DECLARE_UNIQUE_INDEX(pg_class_relname_nsp_index, 2663, ClassNameNspIndexId, pg_class, btree(relname name_ops, relnamespace oid_ops))
CATALOG(pg_class, 1259, RelationRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(83
Oid relnamespace BKI_DEFAULT(pg_catalog) BKI_LOOKUP(pg_namespace)
Oid reltype BKI_LOOKUP_OPT(pg_type)
MAKE_SYSCACHE(RELOID, pg_class_oid_index, 128)
DECLARE_UNIQUE_INDEX_PKEY(pg_class_oid_index, 2662, ClassOidIndexId, pg_class, btree(oid oid_ops))
DECLARE_INDEX(pg_class_tblspc_relfilenode_index, 3455, ClassTblspcRelfilenodeIndexId, pg_class, btree(reltablespace oid_ops, relfilenode oid_ops))
RelationRelation_Rowtype_Id BKI_SCHEMA_MACRO