PostgreSQL Source Code  git master
catalog.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * catalog.h
4  * prototypes for functions in backend/catalog/catalog.c
5  *
6  *
7  * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * src/include/catalog/catalog.h
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef CATALOG_H
15 #define CATALOG_H
16 
17 #include "catalog/pg_class.h"
18 #include "utils/relcache.h"
19 
20 
21 extern bool IsSystemRelation(Relation relation);
22 extern bool IsToastRelation(Relation relation);
23 extern bool IsCatalogRelation(Relation relation);
24 
25 extern bool IsSystemClass(Oid relid, Form_pg_class reltuple);
26 extern bool IsToastClass(Form_pg_class reltuple);
27 
28 extern bool IsCatalogRelationOid(Oid relid);
29 
30 extern bool IsCatalogNamespace(Oid namespaceId);
31 extern bool IsToastNamespace(Oid namespaceId);
32 
33 extern bool IsReservedName(const char *name);
34 
35 extern bool IsSharedRelation(Oid relationId);
36 
37 extern Oid GetNewOidWithIndex(Relation relation, Oid indexId,
38  AttrNumber oidcolumn);
39 extern Oid GetNewRelFileNode(Oid reltablespace, Relation pg_class,
40  char relpersistence);
41 
42 #endif /* CATALOG_H */
bool IsCatalogNamespace(Oid namespaceId)
Definition: catalog.c:177
bool IsToastNamespace(Oid namespaceId)
Definition: catalog.c:195
unsigned int Oid
Definition: postgres_ext.h:31
bool IsSystemClass(Oid relid, Form_pg_class reltuple)
Definition: catalog.c:80
bool IsSharedRelation(Oid relationId)
Definition: catalog.c:238
bool IsCatalogRelation(Relation relation)
Definition: catalog.c:98
Oid GetNewRelFileNode(Oid reltablespace, Relation pg_class, char relpersistence)
Definition: catalog.c:380
bool IsReservedName(const char *name)
Definition: catalog.c:212
const char * name
Definition: encode.c:561
Oid GetNewOidWithIndex(Relation relation, Oid indexId, AttrNumber oidcolumn)
Definition: catalog.c:317
bool IsToastRelation(Relation relation)
Definition: catalog.c:140
FormData_pg_class * Form_pg_class
Definition: pg_class.h:153
bool IsSystemRelation(Relation relation)
Definition: catalog.c:68
bool IsCatalogRelationOid(Oid relid)
Definition: catalog.c:115
int16 AttrNumber
Definition: attnum.h:21
bool IsToastClass(Form_pg_class reltuple)
Definition: catalog.c:160