Re: [HACKERS] Validation in to_date()

2013-01-14 Thread Tom Lane
Hitoshi Harada writes: > to_date() doesn't check the date range, which results in unreadable > data like this. > foo=# create table t as select to_date('-12-10 BC', '-MM-DD > BC')::timestamp; > SELECT 1 > foo=# table t; > ERROR: timestamp out of range > Attached is to add IS_VALID_JULIA

[HACKERS] Validation in to_date()

2013-01-11 Thread Hitoshi Harada
to_date() doesn't check the date range, which results in unreadable data like this. foo=# create table t as select to_date('-12-10 BC', '-MM-DD BC')::timestamp; SELECT 1 foo=# table t; ERROR: timestamp out of range Attached is to add IS_VALID_JULIAN() as we do like in date_in(). I think