Re: Pet Peeves? - Mailing list pgsql-general

From Jasen Betts
Subject Re: Pet Peeves?
Date
Msg-id gm2861$n94$2@reversiblemaps.ath.cx
Whole thread Raw
In response to Pet Peeves?  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-general
On 2009-01-29, Steve Crawford <scrawford@pinpointresearch.com> wrote:
>
>>> 3. Date handling
>>> Sometimes I've got data with invalid dates and it would be great if it
>>> could replace all the bad ones with, say "0000-00-00".
>>>

 0000-00-00 doesn't fit in a date column.
 perhaps you could use null?

 write a function that casts and catches the exception caused when bad
 dates are attempted and returens null, use it to translate your data.



pgsql-general by date:

Previous
From: Jasen Betts
Date:
Subject: Re: getting no days problem
Next
From: Mohamed
Date:
Subject: Indices types, what to use. Btree, Hash, Gin or Gist