postgres update sequence current value code example Example: postgresql update sequence next value ALTER SEQUENCE seq_name RESTART WITH 22;