Re: csv files - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: csv files
Date
Msg-id 20030409224103.GA5260@wolff.to
Whole thread Raw
In response to csv files  (Dennis Gearon <gearond@cvc.net>)
List pgsql-general
On Wed, Apr 09, 2003 at 11:34:57 -0700,
  Dennis Gearon <gearond@cvc.net> wrote:
> Any  major gotcha's besides only <lf> at the end of lines uploading a csv
> file using copy? I plan on loading the columns into text columns and
> converting them as I load them to other tables.

If any of the data is quoted you will need to strip the quotes. tsv usually
is a bit safer because of that.

>
> The first two lines look like:
> ---------------------------------
>
ZIPCode,ZIPCodeType,City,CityType,County,CountyFIPS,State,StateCode,StateFIPS,MSA,AreaCode,TimeZone,GMTOffset,DST,Latitude,Longitude
> 00501,U,Holtsville,D,Suffolk,36103,New
> York,NY,36,5380,631,Eastern,-5,Y,40.8147,-73.0451
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster


pgsql-general by date:

Previous
From: "scott.marlowe"
Date:
Subject: Re: pg_dump / pg_dumpall / memory issues
Next
From: elein
Date:
Subject: Re: pl/pgsql and global variables