Skip to content

Instantly share code, notes, and snippets.

@digitalm
Last active July 26, 2018 10:15
Show Gist options
  • Save digitalm/0fce84920016752f32f9a96d0354e176 to your computer and use it in GitHub Desktop.
Save digitalm/0fce84920016752f32f9a96d0354e176 to your computer and use it in GitHub Desktop.
setval postgresql upto...
# companies テーブルの id を 2001 から始める
$ psql -d database_name
$ database_name=# SELECT setval(pg_get_serial_sequence('companies', 'id'), 2001);
setval
--------
2001
(1 row)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment