1 /*-------------------------------------------------------------------------
4 * Generic relation related routines.
7 * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * src/include/access/relation.h
12 *-------------------------------------------------------------------------
14 #ifndef ACCESS_RELATION_H
15 #define ACCESS_RELATION_H
17 #include "nodes/primnodes.h"
18 #include "storage/lockdefs.h"
19 #include "utils/relcache.h"
21 extern Relation
relation_open(Oid relationId
, LOCKMODE lockmode
);
22 extern Relation
try_relation_open(Oid relationId
, LOCKMODE lockmode
);
23 extern Relation
relation_openrv(const RangeVar
*relation
, LOCKMODE lockmode
);
24 extern Relation
relation_openrv_extended(const RangeVar
*relation
,
25 LOCKMODE lockmode
, bool missing_ok
);
26 extern void relation_close(Relation relation
, LOCKMODE lockmode
);
28 #endif /* ACCESS_RELATION_H */