Search Postgresql Archives

Re: \copy command error

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

 



On Mon, Aug 03, 2009 at 01:25:56PM -0400, Mark Watson wrote:
> Andrew Maracini wrote:
> >GISCI# \copy gisp from 'd:/projects/gisp/gisp.csv' delimiter ','
> 
> If this is the case, exporting the
> City/state field wrapped in quotation marks should do the trick

You'll want to use the real CSV parser then, the code in psql would look
like this:

  \copy gisp FROM 'd:/projects/gisp/gisp.csv' WITH CSV

PG and MS Excel have an almost identical definition of what a CSV file
should look like, opening the file in Excel is always a good quick check
as to why PG isn't liking the file.

-- 
  Sam  http://samason.me.uk/

-- 
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