Re: to_timestamp error handling. - Mailing list pgsql-bugs

From Bruce Momjian
Subject Re: to_timestamp error handling.
Date
Msg-id 201002251832.o1PIWVC21892@momjian.us
Whole thread Raw
In response to Re: to_timestamp error handling.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Tom Lane wrote:
> Bruce Momjian <bruce@momjian.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@momjian.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. +

pgsql-bugs by date:

Previous
From: "David E. Wheeler"
Date:
Subject: Re: New PL/Perl failure with Safe 2.2x due to recursion (8.x & 9.0)
Next
From: Alex Hunsaker
Date:
Subject: Re: New PL/Perl failure with Safe 2.2x due to recursion (8.x & 9.0)