Running COPY results in ERROR: invalid input syntax for integer: \"\" error message for me. What am I missing?
ERROR: invalid input syntax for integer: \"\"
My /tmp/people.cs
/tmp/people.cs
There is a way to solve "", the quoted null string as null in integer column, use FORCE_NULL option :
\copy table_name FROM 'file.csv' with (FORMAT CSV, FORCE_NULL(column_name));
see postgresql document, https://www.postgresql.org/docs/current/static/sql-copy.html