john snow <ofbizfanster@gmail.com> writes:
> we're porting old dbf's to postgresql 10. currently, we have a dbf that did
> not have a defined primary key. in the postgresql 10 table, we want to
> define a technical primary key using postgresql 10's identity column.
> when we export the dbf data to a csv, the csv does not have data for the
> new primary key column, so the COPY FROM command fails and we get the error
> message saying null is not a valid value for the primary key column.
This sounds like a bug that was fixed last week:
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=ee5b595493e1609903d55709853f5276ba85c81d
You could apply that patch locally, or avoid IDENTITY until 10.2 is out.
regards, tom lane