Finding bogus dates

From: Scott Ribe <scott_ribe(at)killerbytes(dot)com>
To: "pgsql-general postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Finding bogus dates
Date: 2007-01-18 18:26:03
Message-ID: C1D509CB.604D0%scott_ribe@killerbytes.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Suppose that I have a varchar column which contains dates, and some of them
are bogus, such as '1968-02-31'. Is it possible to specify a query condition
"cannot be cast to a valid date". (It's legacy data, and I'm trying to clean
it up before importing into the final schema.) There probably aren't that
many, and I can just keep hitting pg errors one row at a time until I work
through this, but...

--
Scott Ribe
scott_ribe(at)killerbytes(dot)com
http://www.killerbytes.com/
(303) 722-0567 voice

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2007-01-18 18:35:42 Re: GUID/UUID Support
Previous Message Tom Lane 2007-01-18 18:24:28 Re: Clearing plans