Re: Validity check in to_date? - Mailing list pgsql-sql

From CoL
Subject Re: Validity check in to_date?
Date
Msg-id bqhor7$1v1q$1@news.hub.org
Whole thread Raw
In response to Validity check in to_date?  ("Alexander M. Pravking" <fduch@antar.bryansk.ru>)
List pgsql-sql
hi,

SELECT isfinite(timestamp '123.45.2003'); if this is true, the date is 
ok, if error, than not :)

C.


Alexander M. Pravking wrote:

> I just discovered that to_date() function does not check if supplied
> date is correct, giving surprising (at least for me) results:
> 
> fduch=# SELECT to_date('31.11.2003', 'DD.MM.YYYY');
>   to_date
> ------------
>  2003-12-01
> 
> or even
> 
> fduch=# SELECT to_date('123.45.2003', 'DD.MM.YYYY');
>   to_date
> ------------
>  2007-01-03


pgsql-sql by date:

Previous
From: googlemike@hotpop.com (Google Mike)
Date:
Subject: How Do I Toggle Quoted Identifiers?
Next
From: CoL
Date:
Subject: Re: XML & Postgres Functions