Re: Bug in to_timestamp().

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Alex Ignatov <a(dot)ignatov(at)postgrespro(dot)ru>, Bruce Momjian <bruce(at)momjian(dot)us>, amul sul <sul_amul(at)yahoo(dot)co(dot)in>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bug in to_timestamp().
Date: 2016-06-23 17:46:15
Message-ID: CAKFQuwbhq+cm6gbdEK0tVk8+M_95YYBu940bHPbo=m7mhswgBg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thursday, June 23, 2016, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:

> On Thu, Jun 23, 2016 at 1:12 PM, David G. Johnston
> <david(dot)g(dot)johnston(at)gmail(dot)com <javascript:;>> wrote:
> > to_timestamp with its present behavior is, IMO, a poorly designed
> function
> > that would never be accepted today. Concrete proposals for either
> fixing or
> > deprecating (or both) are welcome. Fixing it should not cause
> unnecessary
> > errors to be raised.
>
> Sheesh. Who put you in charge of this? You basically seem like you
> are trying to shut up anyone who supports this change, and I don't
> think that's right.

>
I'm all for a change in this area - though I'm not impacted enough to
actually work on a design proposal. And I'm not sure how asking for ideas
constitutes trying to shut people up. Especially since if no one does
float a proposal we'll simply have this discussion next year when someone
new discovers how badly behaved this function is.

> My main point is that I'm inclined to deprecate it.
>

> I can almost guarantee that would make a lot of users very unhappy.
> This function is widely used.
>
>
Tell people not to use. We'd leave it in, unchanged, on backward
compatibility grounds. This seems like acceptable behavior for the
project. Am I mistaken?

> > My second point is if you are going to use this badly designed function
> you
> > need to protect yourself.
>
> I agree that anyone using this function should test their format
> strings carefully.
>
> > My understanding is that is not going to change for 9.6.
>
> That's exactly what is under discussion here.
>
>
Ok. I'm having trouble seeing this justified as a bug fix - the docs
clearly state our behavior is intentional. Improved behavior, yes, but
that's a feature and we're in beta2. Please be specific if you believe
I've misinterpreted project policies on this matter.

David J.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2016-06-23 17:49:55 Re: Rethinking representation of partial-aggregate steps
Previous Message Robert Haas 2016-06-23 17:42:53 Re: Bug in to_timestamp().