Created
April 4, 2017 10:50
-
-
Save vskrachkov/67988a0b621535bb2a96d7500b624af7 to your computer and use it in GitHub Desktop.
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 'SELECT setval(''main_' || c.relname || ''', nextval(''' || n.nspname || '.' || c.relname || ''') + 20);' FROM pg_class c | |
JOIN pg_namespace n ON n.oid = c.relnamespace | |
WHERE c.relkind = 'S' and n.nspname = 'main'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment