Mein Tisch,Postgres COPY ungültige Syntax für integer
Table "public.product_status"
Column | Type | Modifiers
--------+-----------------------+-----------
id | integer | not null
code | character varying(10) |
notes | text |
Erste Zeile meiner CSV-Datei,
1,S,blah blah blah
Befehl Kopieren,
=# copy product_status from 'status_table.csv' with csv;
ERROR: invalid input syntax for integer: "1"
CONTEXT: COPY product_status, line 1, column id: "1"
wirklich nicht verstehen, wie das ist, Ungültige Syntax für eine ganze Zahl! Auch Postgres mir zustimmen scheint,
=# insert into product_status values (1,'S','blah blah blah');
=# copy product_status to STDOUT with csv;
1,S,blah blah blah
Irgendwelche Ideen? Andere Fragen, die ich auf der Seite fand, schienen nicht auf alles anwendbar zu sein, was ich hier falsch gemacht habe.
Danke Laurenz, ich hatte BOM in meiner Datei! –
Danke - 'od -c' ist sehr nützlich! –