PostgreSQL Source Code
git master
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
c
d
g
h
i
k
l
m
p
r
s
t
Functions
Variables
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
c
d
f
h
i
n
o
p
r
s
t
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
lockoptions.h
Go to the documentation of this file.
1
/*-------------------------------------------------------------------------
2
*
3
* lockoptions.h
4
* Common header for some locking-related declarations.
5
*
6
*
7
* Copyright (c) 2014-2025, PostgreSQL Global Development Group
8
*
9
* src/include/nodes/lockoptions.h
10
*
11
*-------------------------------------------------------------------------
12
*/
13
#ifndef LOCKOPTIONS_H
14
#define LOCKOPTIONS_H
15
16
/*
17
* This enum represents the different strengths of FOR UPDATE/SHARE clauses.
18
* The ordering here is important, because the highest numerical value takes
19
* precedence when a RTE is specified multiple ways. See applyLockingClause.
20
*/
21
typedef
enum
LockClauseStrength
22
{
23
LCS_NONE
,
/* no such clause - only used in PlanRowMark */
24
LCS_FORKEYSHARE
,
/* FOR KEY SHARE */
25
LCS_FORSHARE
,
/* FOR SHARE */
26
LCS_FORNOKEYUPDATE
,
/* FOR NO KEY UPDATE */
27
LCS_FORUPDATE
,
/* FOR UPDATE */
28
}
LockClauseStrength
;
29
30
/*
31
* This enum controls how to deal with rows being locked by FOR UPDATE/SHARE
32
* clauses (i.e., it represents the NOWAIT and SKIP LOCKED options).
33
* The ordering here is important, because the highest numerical value takes
34
* precedence when a RTE is specified multiple ways. See applyLockingClause.
35
*/
36
typedef
enum
LockWaitPolicy
37
{
38
/* Wait for the lock to become available (default behavior) */
39
LockWaitBlock
,
40
/* Skip rows that can't be locked (SKIP LOCKED) */
41
LockWaitSkip
,
42
/* Raise an error if a row cannot be locked (NOWAIT) */
43
LockWaitError
,
44
}
LockWaitPolicy
;
45
46
/*
47
* Possible lock modes for a tuple.
48
*/
49
typedef
enum
LockTupleMode
50
{
51
/* SELECT FOR KEY SHARE */
52
LockTupleKeyShare
,
53
/* SELECT FOR SHARE */
54
LockTupleShare
,
55
/* SELECT FOR NO KEY UPDATE, and UPDATEs that don't modify key columns */
56
LockTupleNoKeyExclusive
,
57
/* SELECT FOR UPDATE, UPDATEs that modify key columns, and DELETE */
58
LockTupleExclusive
,
59
}
LockTupleMode
;
60
61
#endif
/* LOCKOPTIONS_H */
LockWaitPolicy
LockWaitPolicy
Definition:
lockoptions.h:37
LockWaitSkip
@ LockWaitSkip
Definition:
lockoptions.h:41
LockWaitBlock
@ LockWaitBlock
Definition:
lockoptions.h:39
LockWaitError
@ LockWaitError
Definition:
lockoptions.h:43
LockTupleMode
LockTupleMode
Definition:
lockoptions.h:50
LockTupleExclusive
@ LockTupleExclusive
Definition:
lockoptions.h:58
LockTupleNoKeyExclusive
@ LockTupleNoKeyExclusive
Definition:
lockoptions.h:56
LockTupleShare
@ LockTupleShare
Definition:
lockoptions.h:54
LockTupleKeyShare
@ LockTupleKeyShare
Definition:
lockoptions.h:52
LockClauseStrength
LockClauseStrength
Definition:
lockoptions.h:22
LCS_FORUPDATE
@ LCS_FORUPDATE
Definition:
lockoptions.h:27
LCS_NONE
@ LCS_NONE
Definition:
lockoptions.h:23
LCS_FORSHARE
@ LCS_FORSHARE
Definition:
lockoptions.h:25
LCS_FORKEYSHARE
@ LCS_FORKEYSHARE
Definition:
lockoptions.h:24
LCS_FORNOKEYUPDATE
@ LCS_FORNOKEYUPDATE
Definition:
lockoptions.h:26
src
include
nodes
lockoptions.h
Generated on Wed Apr 23 2025 00:13:27 for PostgreSQL Source Code by
1.9.4