Re: csv copy error
| От | Guillaume Lelarge |
|---|---|
| Тема | Re: csv copy error |
| Дата | |
| Msg-id | CAECtzeV3gs_Ga+XmRrPHCE98WQdYs51UUf2W5LEW17p5VDLNQg@mail.gmail.com обсуждение исходный текст |
| Ответ на | csv copy error (ourdiaspora <ourdiaspora@protonmail.com>) |
| Ответы |
Re: csv copy error
|
| Список | pgsql-general |
Hi,
Le mer. 29 déc. 2021 à 22:08, ourdiaspora <ourdiaspora@protonmail.com> a écrit :
Readers,
Please could anyone help with the following error produced:
"
ERROR: invalid input syntax for integer: "1,m "
CONTEXT: COPY exampletable, line 1, column examplenumber: "1,m "
The database commands:
"
CREATE TABLE exampletable (examplenumber smallint,
exampletitle varchar(500)
);
"
"
\copy exampletable from '/local/path/to/examplefile.csv';
"
CSV file contents:
"
1,m
2,m
9,t
"
You should tell the CSV command you're using a CSV file. By default, COPY thinks it's a TSV file.
--
Guillaume.
В списке pgsql-general по дате отправления: