Re: Infinite Interval

From: jian he <jian(dot)universality(at)gmail(dot)com>
To: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
Cc: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, Joseph Koshakow <koshy44(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Gregory Stark (as CFM)" <stark(dot)cfm(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Infinite Interval
Date: 2023-09-14 06:28:09
Message-ID: CACJufxGEpX6DzC4BTTkbnsCB7kS6bXi0RrPAyqnivBmbQC8_1A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Sep 13, 2023 at 6:13 PM Ashutosh Bapat
<ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> wrote:
>
> to sum(). I am planning to work on this next week but in case somebody
> else wants to pick this up here are patches with other things fixed.
>
> --
> Best Wishes,
> Ashutosh Bapat

hi. some doc issues.

- <literal>decade</literal>, <literal>century</literal>, and
<literal>millennium</literal>).
+ <literal>decade</literal>, <literal>century</literal>, and
<literal>millennium</literal>
+ for all types and <literal>hour</literal> and
<literal>day</literal> just for <type>interval</type>).

The above part seems not right. some fields do not apply to interval data types.
test case:
SELECT EXTRACT(epoch FROM interval 'infinity') as epoch
,EXTRACT(YEAR FROM interval 'infinity') as year
,EXTRACT(decade FROM interval 'infinity') as decade
,EXTRACT(century FROM interval 'infinity') as century
,EXTRACT(millennium FROM interval 'infinity') as millennium
,EXTRACT(month FROM interval 'infinity') as mon
,EXTRACT(day FROM interval 'infinity') as day
,EXTRACT(hour FROM interval 'infinity') as hour
,EXTRACT(min FROM interval 'infinity') as min
,EXTRACT(second FROM interval 'infinity') as sec;

--------------------

- <entry><type>date</type>, <type>timestamp</type></entry>
+ <entry><type>date</type>, <type>timestamp</type>,
<type>interval</type></entry>
<entry>later than all other time stamps</entry>

it seems we have forgotten to mention the -infinity case, we can fix
the doc together, since <type>timestamptz</type> also applies to
+/-infinity.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Krishnakumar R 2023-09-14 06:28:44 Small patch modifying variable name to reflect the logic involved
Previous Message Himanshu Upadhyaya 2023-09-14 06:14:34 Re: CHECK Constraint Deferrable