pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Steve Crawford <scrawford@pinpointresearch.com>
Cc: Alex Ignatov <a.ignatov@postgrespro.ru>
Cc: Albe Laurenz <laurenz.albe@wien.gv.at>
Cc: amul sul <sul_amul@yahoo.co.in>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: Bug in to_timestamp().
Date: Fri, 24 Jun 2016 17:16:38 -0400
Message-ID: <845.1466802998@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+Tgmoa65k+PQNNAu717DdjaA9-uGMWt=ov0NUWmUXggZRRY3A@mail.gmail.com>
References: <1873520224.1784572.1465833145330.JavaMail.yahoo.ref@mail.yahoo.com>
	<1873520224.1784572.1465833145330.JavaMail.yahoo@mail.yahoo.com>
	<20932.1465834344@sss.pgh.pa.us>
	<CA+TgmoaD8TuS=sHKS1f1qAfizCBouejgmO2jYnJ_=ia343uGSA@mail.gmail.com>
	<CA+TgmoZKJOoywaBT-K_pmQT4yPuDmR5AxjcEdwiCofA5Q3S0yA@mail.gmail.com>
	<11349.1466429771@sss.pgh.pa.us>
	<A737B7A37273E048B164557ADEF4A58B53862B37@ntex2010i.host.magwien.gv.at>
	<a0c79f21-1d30-23d2-b82d-33031503c6dd@postgrespro.ru>
	<CAEfWYywsvT1_PV7pFJhJZJ03R3DmgqgDaCjHpXJdCHSfCMY6fw@mail.gmail.com>
	<CA+Tgmoa65k+PQNNAu717DdjaA9-uGMWt=ov0NUWmUXggZRRY3A@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Robert Haas <robertmhaas@gmail.com> writes:
> On Fri, Jun 24, 2016 at 12:26 PM, Steve Crawford
> <scrawford@pinpointresearch.com> wrote:
>> To me, 2016-02-30 is an invalid date that should generate an error.

> I don't particularly disagree with that, but on the other hand, as
> mentioned earlier, to_timestamp() is here for Oracle compatibility,
> and if it doesn't do what Oracle's function does, then (1) it's not
> useful for people migrating from Oracle and (2) we're making up the
> behavior out of whole cloth.  I think things that we invent ourselves
> should reject stuff like this, but in a compatibility function we
> might want to, say, have compatibility.

Agreed, mostly, but ... how far are we prepared to go on that?  The one
thing I know about that is different from Oracle and is not something that
most people would consider clearly wrong is the behavior of the FM prefix.
We think it's a prefix that modifies only the next format code; they think
it's a toggle.  If we make that act like Oracle, we will silently break an
awful lot of applications, and there will be *no way* to write code that
is correct under both interpretations.  (And no, I do not want to hear
"let's fix it with a GUC".)  So I'm afraid we're between a rock and a hard
place on that one --- but if we let that stand, the argument that Oracle's
to_timestamp should be treated as right by definition loses a lot of air.

			regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (138+ messages)  latest in thread

Message-ID: <845.1466802998@sss.pgh.pa.us>
Permalink:  ../845.1466802998@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/845.1466802998@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, scrawford@pinpointresearch.com, a.ignatov@postgrespro.ru, laurenz.albe@wien.gv.at, sul_amul@yahoo.co.in
  Subject: Re: Bug in to_timestamp().
  In-Reply-To: <845.1466802998@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox