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

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Henk Enting <h(dot)d(dot)enting(at)mgrid(dot)net>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6231: weird to_timestamp behaviour with out of range values
Date: 2011-10-02 00:00:23
Message-ID: 20111002000023.GC12765@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

* Henk Enting (h(dot)d(dot)enting(at)mgrid(dot)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 reason why we should be allowing it in to_timestamp(). If the
values at the 'MM' location are outside of the valid range, we should be
throwing an error.

Thanks,

Stephen

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Magnus Hagander 2011-10-03 07:59:14 Re: [GENERAL] One-click installer, Windows 7 32-bit, and icacls.exe
Previous Message Tom Lane 2011-10-01 18:12:41 Re: Typo in nbtsort.c