PostgreSQL Source Code git master
relation.h
Go to the documentation of this file.
1/*-------------------------------------------------------------------------
2 *
3 * relation.h
4 * Generic relation related routines.
5 *
6 *
7 * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
9 *
10 * src/include/access/relation.h
11 *
12 *-------------------------------------------------------------------------
13 */
14#ifndef ACCESS_RELATION_H
15#define ACCESS_RELATION_H
16
17#include "nodes/primnodes.h"
18#include "storage/lockdefs.h"
19#include "utils/relcache.h"
20
21extern Relation relation_open(Oid relationId, LOCKMODE lockmode);
22extern Relation try_relation_open(Oid relationId, LOCKMODE lockmode);
23extern Relation relation_openrv(const RangeVar *relation, LOCKMODE lockmode);
24extern Relation relation_openrv_extended(const RangeVar *relation,
25 LOCKMODE lockmode, bool missing_ok);
26extern void relation_close(Relation relation, LOCKMODE lockmode);
27
28#endif /* ACCESS_RELATION_H */
int LOCKMODE
Definition: lockdefs.h:26
unsigned int Oid
Definition: postgres_ext.h:32
Relation relation_openrv_extended(const RangeVar *relation, LOCKMODE lockmode, bool missing_ok)
Definition: relation.c:172
void relation_close(Relation relation, LOCKMODE lockmode)
Definition: relation.c:205
Relation try_relation_open(Oid relationId, LOCKMODE lockmode)
Definition: relation.c:88
Relation relation_openrv(const RangeVar *relation, LOCKMODE lockmode)
Definition: relation.c:137
Relation relation_open(Oid relationId, LOCKMODE lockmode)
Definition: relation.c:47