I have a table called person with primary key
on id;
I am trying to insert into this table with:
insert into person (first_name, last_name, email, gender, date_of_birth, country_of_birth) values ('Ellissa', 'Gordge', 'ggordge0@gnu.org', 'Male', '2022-03-19', 'Fiji');
There should not be any ID
constraint which are being violated since it is a BIGSERIAL
yet I am getting this:
It says Key id=(8) already exists and it is incrementing on each attempt to run this command. How can ID
already exist? And why is it not incrementing from the bottom of the list?
If i specify the id in the insert statement, with a number which i know is unique it works. I just don't understand why is it not doing it automatically since I am using BIGSERIAL
.