[HACKERS] Problem with zero year

2009-03-17 Thread Bruce Momjian
We added the following commit in 8.4: /src/backend/utils/adt/datetime.c tgl Reject year zero during datetime input, except when it's a 2-digit year (then it means 2000 AD). Formerly we silently

Re: [HACKERS] Problem with zero year

2009-03-17 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: The problem is that the 2-digit year check is for =2 digits, not exactly two digits: ... This leads to some unexpected outputs: test= select '1-1-0'::date; date 2000-01-01 We've interpreted that like that

Re: [HACKERS] Problem with zero year

2009-03-17 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian br...@momjian.us writes: The problem is that the 2-digit year check is for =2 digits, not exactly two digits: ... This leads to some unexpected outputs: test= select '1-1-0'::date; date 2000-01-01 We've