My table has a NOT NULL column called 'created' with DEFAULT CLOCK_TIMESTAMP(). My CSV file from which I am copying intentionally does not have a column called 'created' because I want the database to use the default value for it. My copy command is:
\copy table_name from '/local/path/to/file.csv' delimiter ',' CSV HEADER
The error I receive is:
missing data for column "created_"
The PostgreSQL documentation says: "If there are any columns in the table that are not in the column list, COPY FROM will insert the default values for those columns."
Thanks for any help