From: | dpopova(at)uvic(dot)ca |
---|---|
To: | dpopova(at)uvic(dot)ca |
Cc: | "Adrian Klaver" <adrian(dot)klaver(at)aklaver(dot)com>, rod(at)iol(dot)ie, pgsql-general(at)postgresql(dot)org, "John R Pierce" <pierce(at)hogranch(dot)com> |
Subject: | Re: Load Data with COPY |
Date: | 2015-03-25 03:27:02 |
Message-ID: | 55a0bf417dc4a25edaf436ed31a1318c.squirrel@wm3.uvic.ca |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Successfully loaded two files into two different tables. Happy. :-)
Diana
> Yes, it is a header in the .csv file. I did not know that there is such an
> option as specifying WITH HEADER in COPY.
> I should have tried to delete the header and specify the loading columns
> in the COPY itself.
>
> Thank you, Adrian, Ray, and John.
>
> Diana
>
>
>> On 03/24/2015 02:16 PM, Raymond O'Donnell wrote:
>>> On 24/03/2015 21:00, dpopova(at)uvic(dot)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(dot)klaver(at)aklaver(dot)com
>> --
>> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org) To
> make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-general
>
>
>
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
From | Date | Subject | |
---|---|---|---|
Next Message | Nicolas Paris | 2015-03-25 03:50:05 | Re: Load Data with COPY |
Previous Message | dpopova | 2015-03-25 01:59:03 | Re: Load Data with COPY |