Re: to_timestamp error handling.

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Dhaval Jaiswal <dhaval(dot)jaiswal(at)enterprisedb(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: to_timestamp error handling.
Date: 2010-02-25 18:32:31
Message-ID: 201002251832.o1PIWVC21892@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> 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 item for further tightening of the function's error checking.

There doesn't seem to be any error checking:

test=> select to_timestamp('20090140','YYYYMMDD');
to_timestamp
------------------------
2009-02-09 00:00:00-05
(1 row)

The odd thing is we seems to do something reasonable for some definition
of reasonable so maybe we just leave it unchanged.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
PG East: http://www.enterprisedb.com/community/nav-pg-east-2010.do
+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Alex Hunsaker 2010-02-25 19:08:42 Re: New PL/Perl failure with Safe 2.2x due to recursion (8.x & 9.0)
Previous Message David E. Wheeler 2010-02-25 18:05:03 Re: New PL/Perl failure with Safe 2.2x due to recursion (8.x & 9.0)