Zmień lub zmień licznik sekwencji PostgreSQL

SELECT setval('payments_id_seq', 21, true);  # next value will be 22
Naughty Narwhal