Created
March 7, 2025 21:11
-
-
Save SebKay/5373e5e39d735ddab77f4b77c42b289a to your computer and use it in GitHub Desktop.
Fix PostresSQL sequence out of order
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT SETVAL((SELECT PG_GET_SERIAL_SEQUENCE('"table"', 'id')), (SELECT (MAX("id") + 1) FROM "table"), FALSE); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment