Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id D489EB5DBDB for ; Sat, 1 Oct 2011 21:00:30 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 61358-08 for ; Sun, 2 Oct 2011 00:00:24 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from tamriel.snowman.net (tamriel.snowman.net [72.66.115.51]) by mail.postgresql.org (Postfix) with ESMTP id 4C1AAB5DBD8 for ; Sat, 1 Oct 2011 21:00:24 -0300 (ADT) Received: by tamriel.snowman.net (Postfix, from userid 1000) id A71EA22909; Sat, 1 Oct 2011 20:00:23 -0400 (EDT) Date: Sat, 1 Oct 2011 20:00:23 -0400 From: Stephen Frost To: Henk Enting Cc: Robert Haas , Tom Lane , pgsql-bugs@postgresql.org Subject: Re: BUG #6231: weird to_timestamp behaviour with out of range values Message-ID: <20111002000023.GC12765@tamriel.snowman.net> References: <201109281455.p8SEtveU095497@wwwmaster.postgresql.org> <3605.1317224606@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KAtLAm/lMQMd2j9H" Content-Disposition: inline In-Reply-To: X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/2.6.32-5-amd64 (x86_64) X-Uptime: 19:58:56 up 241 days, 8:29, 14 users, load average: 0.10, 0.04, 0.01 User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.404 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201110/4 X-Sequence-Number: 31274 --KAtLAm/lMQMd2j9H Content-Type: text/plain; charset=us-ascii Content-Disposition: inline * Henk Enting (h.d.enting@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 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 --KAtLAm/lMQMd2j9H Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAk6HqZcACgkQrzgMPqB3kig7wACdEf0h38n+0JolDfgN/3dYnk0+ r+QAoJktpSkjtt+l8pgzSOIIr+E4l3jT =ftkS -----END PGP SIGNATURE----- --KAtLAm/lMQMd2j9H--