SyntaxFix
Write A Post
Hire A Developer
Questions
The parentheses are misplaced:
SELECT setval('payments_id_seq', 21, true); # next value will be 22
Otherwise you're calling setval with a single argument, while it requires two or three.
setval