mirror of
https://github.com/postgres/postgres.git
synced 2026-03-12 05:32:27 -04:00
This is the first run of the Perl-based pgindent script. Also update pgindent instructions.
41 lines
1.3 KiB
C
41 lines
1.3 KiB
C
/*-------------------------------------------------------------------------
|
|
*
|
|
* relpath.h
|
|
* Declarations for relpath() and friends
|
|
*
|
|
* Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
|
*
|
|
* src/include/common/relpath.h
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
#ifndef RELPATH_H
|
|
#define RELPATH_H
|
|
|
|
/*
|
|
* 'pgrminclude ignore' needed here because CppAsString2() does not throw
|
|
* an error if the symbol is not defined.
|
|
*/
|
|
#include "catalog/catversion.h" /* pgrminclude ignore */
|
|
#include "storage/relfilenode.h"
|
|
|
|
|
|
#define OIDCHARS 10 /* max chars printed by %u */
|
|
#define TABLESPACE_VERSION_DIRECTORY "PG_" PG_MAJORVERSION "_" \
|
|
CppAsString2(CATALOG_VERSION_NO)
|
|
|
|
extern const char *forkNames[];
|
|
extern int forkname_chars(const char *str, ForkNumber *fork);
|
|
extern char *relpathbackend(RelFileNode rnode, BackendId backend,
|
|
ForkNumber forknum);
|
|
|
|
/* First argument is a RelFileNodeBackend */
|
|
#define relpath(rnode, forknum) \
|
|
relpathbackend((rnode).node, (rnode).backend, (forknum))
|
|
|
|
/* First argument is a RelFileNode */
|
|
#define relpathperm(rnode, forknum) \
|
|
relpathbackend((rnode), InvalidBackendId, (forknum))
|
|
|
|
#endif /* RELPATH_H */
|