Header And Logo

PostgreSQL
| The world's most advanced open source database.

relpath.h

Go to the documentation of this file.
00001 /*-------------------------------------------------------------------------
00002  *
00003  * relpath.h
00004  *      Declarations for relpath() and friends
00005  *
00006  * Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group
00007  * Portions Copyright (c) 1994, Regents of the University of California
00008  *
00009  * src/include/common/relpath.h
00010  *
00011  *-------------------------------------------------------------------------
00012  */
00013 #ifndef RELPATH_H
00014 #define RELPATH_H
00015 
00016 /*
00017  *  'pgrminclude ignore' needed here because CppAsString2() does not throw
00018  *  an error if the symbol is not defined.
00019  */
00020 #include "catalog/catversion.h" /* pgrminclude ignore */
00021 #include "storage/relfilenode.h"
00022 
00023 
00024 #define OIDCHARS        10      /* max chars printed by %u */
00025 #define TABLESPACE_VERSION_DIRECTORY    "PG_" PG_MAJORVERSION "_" \
00026                                     CppAsString2(CATALOG_VERSION_NO)
00027 
00028 extern const char *forkNames[];
00029 extern int  forkname_chars(const char *str, ForkNumber *fork);
00030 extern char *relpathbackend(RelFileNode rnode, BackendId backend,
00031                ForkNumber forknum);
00032 
00033 /* First argument is a RelFileNodeBackend */
00034 #define relpath(rnode, forknum) \
00035         relpathbackend((rnode).node, (rnode).backend, (forknum))
00036 
00037 /* First argument is a RelFileNode */
00038 #define relpathperm(rnode, forknum) \
00039         relpathbackend((rnode), InvalidBackendId, (forknum))
00040 
00041 #endif      /* RELPATH_H */