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

From Robert Haas
Subject Re: 'infinity'::Interval should be added
Date
Msg-id CA+TgmoZdo0y281k1QpCLVcUo9jCp8KSDWO3WHg2vZJRu1UKTPg@mail.gmail.com
Whole thread Raw
In response to 'infinity'::Interval should be added  (Simon Riggs <simon@2ndquadrant.com>)
Responses Re: 'infinity'::Interval should be added
List pgsql-hackers
On Thu, Dec 13, 2018 at 9:42 AM Simon Riggs <simon@2ndquadrant.com> wrote:
> At present we have a timestamp of 'infinity' and infinite ranges, but no infinite interval
>
> SELECT 'infinity'::timestamp;
> works
>
> SELECT 'infinity'::interval;
> ERROR:  invalid input syntax for type interval: "infinity"
>
> Seems a strange anomaly that we should fix.

Why?  I consider it somewhat of a wart that timestamps allow infinity
- it adds special case coding all over the place.  Allowing intervals
to be infinite as well seems like it'll just create more special cases
without really solving anything.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Andrew Gierth
Date:
Subject: Re: Ryu floating point output patch
Next
From: Isaac Morland
Date:
Subject: Re: ExecBuildGroupingEqual versus collations