Wiki / Functions
currval
Returns the value most recently obtained by nextval for this sequence in the current session. (An error is reported if nextval has never been called for this sequence in this session.) Because this is returning a session-local value, it gives a predictable answer whether or not other sessions have executed nextval since the current session did.
English manual coverage begins with PostgreSQL 7.1. Source history and runtime observations have their own recorded version boundaries.
Reading PG 18·Select a recorded version
- group
- sequence
- group label
- Sequence Manipulation Functions
- lang
- en
- layout
- table-new
- pages
- functions-sequence.html
- prose only
- false