Re: 'infinity'::Interval should be added

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, isaac(dot)morland(at)gmail(dot)com, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: 'infinity'::Interval should be added
Date: 2018-12-15 09:59:35
Message-ID: CANP8+jLwoo-9gqv8bgOA4iLM5qP=7cU+=eXtA-0bG8U83w0nLQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 14 Dec 2018 at 22:24, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:

> So essentially I think supporting special values like infinity boils
> down to trading away some small amount of performance -- more likely
> to be noticeable with JIT -- for some amount of possible programmer
> convenience. Some people may think that's a good trade, and other
> people may not like it. It just depends on whether the 'infinity'
> value is useful to you. If it is, you'll probably like the trade,
> because aside from the notational cost which Isaac mentioned, it's
> probably vastly faster to handle the infinity values in C code than to
> stick CASE..WHEN in to an SQL query. If it's not, you may dislike it.
> If your application code now has to know about the possibility
> 'infinity' value that it otherwise wouldn't have to worry about, you
> may dislike it for that reason also.
>
> I'm not sure there's one right answer here - my personal feeling is
> that infinite values are a wart, but I grant Isaac's point that they
> can sometimes simplify SQL coding.
>

I have no objection to the introduction of another datatype that is
stripped down for performance. I understand and agree with that need.

But the current datatypes do handle much complexity already. Blocking this
proposal would not change that, IMHO. All that is being proposed is a small
change to rationalize the existing code.

--
Simon Riggs http://www.2ndQuadrant.com/
<http://www.2ndquadrant.com/>
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sergei Kornilov 2018-12-15 10:04:00 Re: ATTACH/DETACH PARTITION CONCURRENTLY
Previous Message Haribabu Kommi 2018-12-15 08:16:25 Re: Pluggable Storage - Andres's take