Conversion of columns during CSV Import

From: Patrick Schneider <patrick(dot)schneider(at)debeka(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Conversion of columns during CSV Import
Date: 2012-06-29 07:54:23
Message-ID: 4FED5F2F.1020603@debeka.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

Thanks for any idea.

Regards,

Patrick

Responses

Browse pgsql-general by date

  From Date Subject
Next Message adasko98 2012-06-29 08:01:44 Notiffy problem
Previous Message raghu ram 2012-06-29 07:42:41 Re: function lookup using a "real" function call