Re: 'infinity'::Interval should be added

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: 'infinity'::Interval should be added
Date: 2018-12-14 20:15:54
Message-ID: CA+TgmoZdo0y281k1QpCLVcUo9jCp8KSDWO3WHg2vZJRu1UKTPg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Dec 13, 2018 at 9:42 AM Simon Riggs <simon(at)2ndquadrant(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Isaac Morland 2018-12-14 20:18:23 Re: ExecBuildGroupingEqual versus collations
Previous Message Andrew Gierth 2018-12-14 20:06:30 Re: Ryu floating point output patch