copy in date string "00-00-00 00:00:00" - Mailing list pgsql-general

From Mark Phillips
Subject copy in date string "00-00-00 00:00:00"
Date
Msg-id FF1D99E0-4020-4132-B773-E18C87A01EFB@mophilly.com
Whole thread Raw
Responses Re: copy in date string "00-00-00 00:00:00"
List pgsql-general
I am migrating a data set from Oracle 8i to PG 9.1. The process is to export data into csv files, then use the pg "copy
tablefrom file csv header" statement to load the tables. 

There are a number of date columns in the tables that include empty value (null), valid dates, and some with the time
componentonly. The empty values are being output as 00-00-00 00:00:00. 

The import is falling over on rows that contain these "zero" dates.

I can adjust the NLS session format of the date string, within a small range, in the oracle environment. However, each
formI have attempted still results in these "zero" date values in the csv file. 

I am thinking of run the csv files through a filter to change the "00-00-00 00:00:00" to an empty value.

Is there a way for postgres to handle this?

- Mark

pgsql-general by date:

Previous
From: Jeff Davis
Date:
Subject: Re: xlog corruption
Next
From: Scott Marlowe
Date:
Subject: Re: copy in date string "00-00-00 00:00:00"