> If the table has a primary key, then the command *should* have failed with > a duplicate key error as soon as the first dupe was discovered.
Ron,
I had manually set the PKs (column: company_nbr) which has a sequence defined for it when I added about 50 rows to the table yesterday.
Now that I'm aware of the DEFAULT option when inserting new rows I tried to reset the sequence maximum number to max(company_nbr); the highest number for the rows inserted yesterday. That's when I tried resetting the current sequence number with the expectation that new rows would be numbered sequentially higher than that value.
Today I saw that I had missed one new company and entered it using DEFAULT for the company_nbr PK.
No need to do that. Just write:
INSERT INTO public.companies (company_name, , industry, status)