Re: 'infinity'::Interval should be added - Mailing list pgsql-hackers

From Tom Lane
Subject Re: 'infinity'::Interval should be added
Date
Msg-id 23224.1544885090@sss.pgh.pa.us
Whole thread Raw
In response to Re: 'infinity'::Interval should be added  (Simon Riggs <simon@2ndquadrant.com>)
Responses Re: 'infinity'::Interval should be added
List pgsql-hackers
Simon Riggs <simon@2ndquadrant.com> writes:
> On Fri, 14 Dec 2018 at 22:24, Robert Haas <robertmhaas@gmail.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


pgsql-hackers by date:

Previous
From: Petr Jelinek
Date:
Subject: Re: row filtering for logical replication
Next
From: Tom Lane
Date:
Subject: Re: removal of dangling temp tables