Re: [BUGS] to_timestamp error handling.

2010-02-25 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian writes: > > Tom Lane wrote: > >> Anybody know what Oracle's to_timestamp does? > > > The old thread reported Oracle returned an error; > > http://archives.postgresql.org/pgsql-bugs/2009-06/msg00100.php > > Well, nothing's likely to get done about it for 9.0.

Re: [BUGS] to_timestamp error handling.

2010-02-24 Thread Tom Lane
Bruce Momjian writes: > Tom Lane wrote: >> Anybody know what Oracle's to_timestamp does? > The old thread reported Oracle returned an error; > http://archives.postgresql.org/pgsql-bugs/2009-06/msg00100.php Well, nothing's likely to get done about it for 9.0. Maybe we should add a TODO ite

Re: [BUGS] to_timestamp error handling.

2010-02-24 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian writes: > > FYI, this behavior now returns: > > > test=> select to_timestamp('20096010','MMDD'); > > to_timestamp > > > > 2013-12-18 00:00:00-05 > > (1 row) > > > which doesn't have the :30 but is still odd.

Re: [BUGS] to_timestamp error handling.

2010-02-24 Thread Tom Lane
Bruce Momjian writes: > FYI, this behavior now returns: > test=> select to_timestamp('20096010','MMDD'); > to_timestamp > >2013-12-18 00:00:00-05 > (1 row) > which doesn't have the :30 but is still odd. I don't think the behavio

Re: [BUGS] to_timestamp error handling.

2010-02-24 Thread Bruce Momjian
FYI, this behavior now returns: test=> select to_timestamp('20096010','MMDD'); to_timestamp 2013-12-18 00:00:00-05 (1 row) which doesn't have the :30 but is still odd. I don't see any value checking in to_timestamp. --

Re: [BUGS] to_timestamp error handling.

2009-06-10 Thread tushar
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Peter Eisentraut wrote: > On Wednesday 10 June 2009 18:02:45 Dhaval Jaiswal wrote: >> Yes, there isn't a use case for a month value outside 1-12, i found this >> due a typo. > > What Would Oracle Do? Oracle is throwing an error.

Re: [BUGS] to_timestamp error handling.

2009-06-10 Thread Peter Eisentraut
On Wednesday 10 June 2009 18:02:45 Dhaval Jaiswal wrote: > Yes, there isn't a use case for a month value outside 1-12, i found this > due a typo. What Would Oracle Do? -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.o

Re: [BUGS] to_timestamp error handling.

2009-06-10 Thread Dhaval Jaiswal
Yes, there isn't a use case for a month value outside 1-12, i found this due a typo. On Wed, Jun 10, 2009 at 8:12 PM, Tom Lane wrote: > Greg Stark writes: > > On Wed, Jun 10, 2009 at 3:23 PM, Dhaval > > Jaiswal wrote: > >> postgres=# select to_timestamp('20096010','MMDD'); > >> ---

Re: [BUGS] to_timestamp error handling.

2009-06-10 Thread Tom Lane
Greg Stark writes: > On Wed, Jun 10, 2009 at 3:23 PM, Dhaval > Jaiswal wrote: >> postgres=# select to_timestamp('20096010','MMDD'); >> --- >>  2013-12-18 00:00:00+05:30 > I suspect you'll find that the 60th month after the start of 2009 is > in fact december 2013. Yea

Re: [BUGS] to_timestamp error handling.

2009-06-10 Thread Greg Stark
On Wed, Jun 10, 2009 at 3:23 PM, Dhaval Jaiswal wrote: > > postgres=# select to_timestamp('20096010','MMDD'); > >    to_timestamp > --- >  2013-12-18 00:00:00+05:30 > > (1 row) > > The month is 60 in my case and it is giving some random value, whereas I am > expectin

Re: [BUGS] to_timestamp error handling.

2009-06-10 Thread Dhaval Jaiswal
Hi All, postgres=# select to_timestamp('20096010','MMDD'); to_timestamp --- 2013-12-18 00:00:00+05:30 (1 row) The month is 60 in my case and it is giving some random value, whereas I am expecting some error message like date is not valid. Is it an ex