| От | Tom Lane |
|---|---|
| Тема | Re: ERROR: invalid input syntax for integer: |
| Дата | |
| Msg-id | 3547.1316650024@sss.pgh.pa.us обсуждение |
| Ответ на | ERROR: invalid input syntax for integer: (e-letter <inpost@gmail.com>) |
| Ответы |
Re: ERROR: invalid input syntax for integer:
|
| Список | pgsql-novice |
e-letter <inpost@gmail.com> writes:
> A database table was created with the command:
> CREATE TABLE tablename (column1 bigint,date date,time time,column2 text)
> a csv file was imported, of structure:
> 123456,2000-01-01,01:10,"sometext"
> Using the command:
> \copy tablename from file.csv
> Causes the command terminal error:
> input syntax for integer: "123456,2000-01-01,01:10,"sometext""
> CONTEXT: COPY tablename, line 1, column column2: "123456
I don't believe that \copy will default to assuming that the file is in
csv format. You probably need to add "format csv" or something similar
to that command.
regards, tom lane
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера