24 Oct
2016
24 Oct
'16
2:26 p.m.
I have a column defined as follows:
"div5tailnum" VARCHAR(10) NOT NULL DEFAULT ''
(that's the output of \d mytable), or if you like:
Div5TailNum VARCHAR(10) NOT NULL DEFAULT ''
(that's from the CREATE TABLE command). I'm trying to load data from a CSV file using the following SQL:
COPY OFFSET 2 INTO mytable FROM file.csv USING DELIMITERS ',','\n','"' NULL AS '';
but I get:
INSERT INTO: NOT NULL constraint violated for column ontime.div5tailnum
shouldn't that be impossible, seeing how I've provided a default?