postgres=# select * from identity_always; | |
id | name | |
----+------ | |
1 | RJ | |
(1 row) | |
postgres=# alter table identity_always alter COLUMN id restart ; | |
ALTER TABLE | |
postgres=# insert into identity_always (name) values ('test'); | |
ERROR: duplicate key value violates unique constraint "identity_always_pkey" | |
DETAIL: Key (id)=(1) already exists. | |
postgres=# truncate identity_always restart identity; | |
TRUNCATE TABLE | |
postgres=# insert into identity_always (name) values ('test'); | |
INSERT 0 1 | |
postgres=# select * from identity_always; | |
id | name | |
----+------ | |
1 | test | |
(1 row) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment