Re: Load Data with COPY

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Load Data with COPY
Дата
Msg-id 5511E27A.7060206@aklaver.com
обсуждение исходный текст
Ответ на Re: Load Data with COPY  (Raymond O'Donnell <rod@iol.ie>)
Список pgsql-general
On 03/24/2015 02:16 PM, Raymond O'Donnell wrote:
> On 24/03/2015 21:00, dpopova@uvic.ca wrote:
>> I have 7,000+ rows of data in Numbers. Exported to .csv file, tried to
>> load into postgres table with COPY FROM, failed. Postgres does not
>> recognize the format:
>>
>> ERROR:  invalid input syntax for integer: "project_name,...
>>
>> Is there any way to export/convert the data in Numbers into a format
>> recognizable by postgres?
>> Mac OS 10.10.6; postgres 9.3.5.2
>
> Well, the error says that you're trying to load a string,
> "project_name", into an integer column.
>
> Is there a header row in the CSV file? - if so, delete it and try again.

If it is not a header row issue then it could be the columns in the CSV
file do not match the columns in the table and that data is not matching
what the table column expects. You can specify a column list in the COPY.

>
> Ray.
>


--
Adrian Klaver
adrian.klaver@aklaver.com


В списке pgsql-general по дате отправления:

Предыдущее
От: John R Pierce
Дата:
Сообщение: Re: Load Data with COPY
Следующее
От: dpopova@uvic.ca
Дата:
Сообщение: Re: Load Data with COPY