Re: 'infinity'::Interval should be added

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, 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 14:44:50
Message-ID: 23224.1544885090@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Simon Riggs <simon(at)2ndquadrant(dot)com> writes:
> 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.

> 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.

Yes. The performance argument has some merit for cases like int4 and
float8, where the "useful work" might be as small as one machine
instruction. But timestamp and interval operations are, for the most
part, pretty darn expensive. I doubt that adding special cases to
them for infinity is going to move the needle noticeably. (And as
for JIT, I sincerely hope that the compiler is not dumb enough to try
to in-line those functions.)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-12-15 14:51:31 Re: removal of dangling temp tables
Previous Message Petr Jelinek 2018-12-15 14:23:39 Re: row filtering for logical replication