Re: [BUGS] BUG #6231: weird to_timestamp behaviour with out of range values

2011-10-01 Thread Stephen Frost
* Henk Enting (h.d.ent...@mgrid.net) wrote: > But still, I think the to_timestamp should throw an error if I put in > something like '21-21-2011'. I agree completely, this is a pretty big bug in my opinion. We don't accept invalid or garbage timestamps in the input function, I don't see any reaso

Re: [BUGS] BUG #6231: weird to_timestamp behaviour with out of range values

2011-09-30 Thread Henk Enting
On Thu, Sep 29, 2011 at 5:39 PM, Robert Haas wrote: > On Wed, Sep 28, 2011 at 11:43 AM, Tom Lane wrote: > > "Henk Enting" writes: > >> I would expect the to_timestamp function to return an error when I feed > it > >> out of range values, e.g. months > 13 and days > 31. Instead it seems to > add

Re: [BUGS] BUG #6231: weird to_timestamp behaviour with out of range values

2011-09-29 Thread Robert Haas
On Wed, Sep 28, 2011 at 11:43 AM, Tom Lane wrote: > "Henk Enting" writes: >> I would expect the to_timestamp function to return an error when I feed it >> out of range values, e.g. months > 13 and days > 31. Instead it seems to add >> the surplus to the timestamp and then return it. > > What is y

Re: [BUGS] BUG #6231: weird to_timestamp behaviour with out of range values

2011-09-28 Thread Tom Lane
"Henk Enting" writes: > I would expect the to_timestamp function to return an error when I feed it > out of range values, e.g. months > 13 and days > 31. Instead it seems to add > the surplus to the timestamp and then return it. What is your reason for using to_timestamp at all? The timestamp in

[BUGS] BUG #6231: weird to_timestamp behaviour with out of range values

2011-09-28 Thread Henk Enting
The following bug has been logged online: Bug reference: 6231 Logged by: Henk Enting Email address: h.d.ent...@mgrid.net PostgreSQL version: 9.1.1 Operating system: linux x86_64 Description:weird to_timestamp behaviour with out of range values Details: I would expec