Re: Best import approach? Delimiters in strings - Mailing list pgsql-general

From Andrew Taylor
Subject Re: Best import approach? Delimiters in strings
Date
Msg-id CAFAE3Jyj7=wLJiNMBN+sqHqy80+aMMR=SvSZD7SfqPrq=o=guw@mail.gmail.com
Whole thread Raw
In response to Best import approach? Delimiters in strings  (Andrew Taylor <andydtaylor@gmail.com>)
Responses Re: Best import approach? Delimiters in strings  (Adrian Klaver <adrian.klaver@gmail.com>)
Re: Best import approach? Delimiters in strings  (Adrian Klaver <adrian.klaver@gmail.com>)
Re: Best import approach? Delimiters in strings  (Adrian Klaver <adrian.klaver@gmail.com>)
List pgsql-general
Unfortunately my starting point is data in the format of that example line.
I hasn't spotted the lack of quotes on the first value. Given this format,
is my best bet to write a script transforming it pre-import to postgres?
I.e. are there no arguments I could pass to the import process to handle
this directly? Thanks
On 16 Feb 2013 17:02, "Andrew Taylor" <andydtaylor@gmail.com> wrote:

> Hi,
>
> A bulk import (script attached) is failing.
>
> Error message:
> psql:/home/andyt/projects/django-stringer/txc/stops_inport.txt:86: ERROR:
>  invalid input syntax for type double precision: "stop_lat"
>
> I think the reason may be a delimiters in strings such as "Golders Green,
> Golders Green, stop GW"
>
> 490015496GW,"Golders Green, Golders Green, stop GW",,51.57207,-0.19549
>
> What's a good way to handle this?
>
> Thanks,
>
>
> Andy
>

pgsql-general by date:

Previous
From: Bret Stern
Date:
Subject: Re: Best import approach? Delimiters in strings
Next
From: Adrian Klaver
Date:
Subject: Re: Best import approach? Delimiters in strings