More PostgreSQL conversion fun - Mailing list pgsql-general

From Nick Wiltshire
Subject More PostgreSQL conversion fun
Date
Msg-id 200604081656.53081.nick@customdesigns.ca
Whole thread Raw
Responses Re: More PostgreSQL conversion fun
List pgsql-general
Hi all,

I have a varchar field in a table which contains dates in yyyy-mm-dd format.
The problem is that some have entered invalid dates like 1975-01-00 and I
want to convert it to a date field to avoid this nonsense. Is there a way to
test for failure of a type conversion and insert a NULL on failure?

Thanks,
Nick

pgsql-general by date:

Previous
From: amrit@health2.moph.go.th
Date:
Subject: Cannot connect Postgresql 8.1 64 bit
Next
From: Devrim Gunduz
Date:
Subject: Re: Cannot connect Postgresql 8.1 64 bit