Wiki / Functions
nextval
Advances the sequence object to its next value and returns that value. This is done atomically: even if multiple sessions execute nextval concurrently, each will safely receive a distinct sequence value. If the sequence object has been created with default parameters, successive nextval calls will return successive values beginning with 1. Other behaviors can be obtained by using appropriate parameters in the CREATE SEQUENCE command.
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