Re: Bug in to_timestamp().

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Alex Ignatov <a(dot)ignatov(at)postgrespro(dot)ru>
Cc: 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:12:28
Message-ID: CAKFQuwb2gp8n2ai_agyJod5BTYxL7ek0AjB9zifDSceK6QntnQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thursday, June 23, 2016, Alex Ignatov <a(dot)ignatov(at)postgrespro(dot)ru> wrote:

> Arguing just like that one can say that we don't even need exception like
> "division by zero". Just use well-formed numbers in denominator...
> Input data sometimes can be generated automagically. Without exception
> throwing debugging stored function containing to_timestamp can be painful.
>

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.

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

My second point is if you are going to use this badly designed function you
need to protect yourself.

My understanding is that is not going to change for 9.6.

David J.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-06-23 17:16:03 Re: Bug in to_timestamp().
Previous Message Robert Haas 2016-06-23 17:12:18 Re: Rethinking representation of partial-aggregate steps