Search Postgresql Archives

Re: Importing CSV File

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/27/2015 08:44 AM, Jeff Janes wrote:
On Mon, Oct 26, 2015 at 2:45 PM, David Blomstrom
<david.blomstrom@xxxxxxxxx <mailto:david.blomstrom@xxxxxxxxx>> wrote:

    I tried to import a CSV file into a PostgreSQL table using pgAdmin
    III. I got an error message: "extra data after last column."


    All my spreadsheets have an "end of data" column that has /r/n in
    each cell. When I import a CSV file into a MySQL table, everything
    beyond /r/n is ignored. Is there some way to tell PostgreSQL to stop
    at /r/n?


How does it know when to stop ignoring and start the next record?

I wondered about that also. I did find this:

http://dev.mysql.com/doc/refman/5.7/en/load-data.html

LINES TERMINATED BY


You could write a little awk or perl script to give the PROGRAM option
of copy, but you can't do that within pgAdmin.

Cheers,

Jeff


--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux