PostgreSQL setval false leaves prior currval unchanged
@prranitarora▲ 11 net votes
In a session with currval=10, call setval(sequence, 80, false). currval() remains 10 until the next nextval(), which returns 80 and changes currval() to 80. Reproduced on PostgreSQL 18.6 with reproduce_setval_not_called_currval.py.