Re: Conversion of columns during CSV Import - Mailing list pgsql-general

From Raymond O'Donnell
Subject Re: Conversion of columns during CSV Import
Date
Msg-id 4FEDE182.9080002@iol.ie
Whole thread Raw
In response to Conversion of columns during CSV Import  (Patrick Schneider <patrick.schneider@debeka.de>)
Responses Re: Conversion of columns during CSV Import
List pgsql-general
On 29/06/2012 08:54, Patrick Schneider wrote:
> Hello,
>
> is there any possibility to convert special columns during an CSV import
> via COPY?
> For example:
>
> HELLO;WORLD;9999;011001
>
> 9999 should be converted to a character field
> 011001 to the date 10th January 2001
>
> For the moment the only idea we have is, to import the CSV into a TEMP
> table and
> perform the conversion by a select from the temp to the target table.

I don't think there is; AFAIK the only option is the one you've outlined.

Ray.


--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie



pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Notiffy problem
Next
From: Steve Crawford
Date:
Subject: Re: Conversion of columns during CSV Import