1 /*-------------------------------------------------------------------------
4 * prototypes for functions in backend/catalog/catalog.c
7 * Portions Copyright (c) 1996-2014, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * src/include/catalog/catalog.h
12 *-------------------------------------------------------------------------
18 * 'pgrminclude ignore' needed here because CppAsString2() does not throw
19 * an error if the symbol is not defined.
21 #include "catalog/catversion.h" /* pgrminclude ignore */
22 #include "catalog/pg_class.h"
23 #include "utils/relcache.h"
25 #define OIDCHARS 10 /* max chars printed by %u */
26 #define TABLESPACE_VERSION_DIRECTORY "PG_" PG_MAJORVERSION "_" \
27 CppAsString2(CATALOG_VERSION_NO)
30 extern bool IsSystemRelation(Relation relation);
31 extern bool IsToastRelation(Relation relation);
32 extern bool IsCatalogRelation(Relation relation);
34 extern bool IsSystemClass(Oid relid, Form_pg_class reltuple);
35 extern bool IsToastClass(Form_pg_class reltuple);
36 extern bool IsCatalogClass(Oid relid, Form_pg_class reltuple);
38 extern bool IsSystemNamespace(Oid namespaceId);
39 extern bool IsToastNamespace(Oid namespaceId);
41 extern bool IsReservedName(const char *name);
43 extern bool IsSharedRelation(Oid relationId);
45 extern Oid GetNewOid(Relation relation);
46 extern Oid GetNewOidWithIndex(Relation relation, Oid indexId,
47 AttrNumber oidcolumn);
48 extern Oid GetNewRelFileNode(Oid reltablespace, Relation pg_class,
51 #endif /* CATALOG_H */