Re: [HACKERS] [BUGS] bug in timestamp and out of range values

2006-11-02 Thread Tom Lane
Robert Treat <[EMAIL PROTECTED]> writes: > I'm not concerned about to_date so much as I am that timestamp_in lets you > store values you can't read with timestamp_out. Your example does not demonstrate any such thing. What it demonstrates is that to_date will let an out-of-range date into the sy

Re: [HACKERS] [BUGS] bug in timestamp and out of range values

2006-11-02 Thread Joshua D. Drake
> > postgres=# select '4714-01-27 BC'::date; > ERROR: date out of range: "4714-01-27 BC" > postgres=# select cast(test as date) from timetest; > test > --- > 4714-01-27 BC > (1 row) > > postgres=# > postgres=# select cast('4714-01-27 BC' as date); > ERROR: date out of range: "

Re: [HACKERS] [BUGS] bug in timestamp and out of range values

2006-11-02 Thread Joshua D. Drake
>> but again to_date doesn't: >> >> regression=# select to_date('4714-01-27 BC', '-MM-DD BC'); >> to_date >> --- >> 4714-01-27 BC >> (1 row) >> > > I'm not concerned about to_date so much as I am that timestamp_in lets you > store values you can't read with timestamp_out. O

Re: [HACKERS] [BUGS] bug in timestamp and out of range values

2006-11-02 Thread Robert Treat
On Thursday 02 November 2006 17:48, Tom Lane wrote: > Robert Treat <[EMAIL PROTECTED]> writes: > > pagila=# select to_date('3232098', 'MM/DD/'); > > to_date > > --- > > 4568-06-26 BC > > (1 row) > > to_date's absymal lack of error checking is well known. It should > surely ref