Use fork names instead of numbers in the file names for additional
[PostgreSQL.git] / src / include / catalog / catalog.h
blob167983376065d1905cfea705e8fd0a71038a6cd2
1 /*-------------------------------------------------------------------------
3 * catalog.h
4 * prototypes for functions in backend/catalog/catalog.c
7 * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * $PostgreSQL$
12 *-------------------------------------------------------------------------
14 #ifndef CATALOG_H
15 #define CATALOG_H
17 #include "catalog/pg_class.h"
18 #include "storage/relfilenode.h"
19 #include "utils/relcache.h"
22 extern const char *forkNames[];
23 extern ForkNumber forkname_to_number(char *forkName);
25 extern char *relpath(RelFileNode rnode, ForkNumber forknum);
26 extern char *GetDatabasePath(Oid dbNode, Oid spcNode);
28 extern bool IsSystemRelation(Relation relation);
29 extern bool IsToastRelation(Relation relation);
31 extern bool IsSystemClass(Form_pg_class reltuple);
32 extern bool IsToastClass(Form_pg_class reltuple);
34 extern bool IsSystemNamespace(Oid namespaceId);
35 extern bool IsToastNamespace(Oid namespaceId);
37 extern bool IsReservedName(const char *name);
39 extern bool IsSharedRelation(Oid relationId);
41 extern Oid GetNewOid(Relation relation);
42 extern Oid GetNewOidWithIndex(Relation relation, Oid indexId,
43 AttrNumber oidcolumn);
44 extern Oid GetNewRelFileNode(Oid reltablespace, bool relisshared,
45 Relation pg_class);
47 #endif /* CATALOG_H */