Re: Infinite Interval

Поиск
Список
Период
Сортировка
От jian he
Тема Re: Infinite Interval
Дата
Msg-id CACJufxGEpX6DzC4BTTkbnsCB7kS6bXi0RrPAyqnivBmbQC8_1A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Infinite Interval  (Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>)
Ответы Re: Infinite Interval  (jian he <jian.universality@gmail.com>)
Re: Infinite Interval  (Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>)
Список pgsql-hackers
On Wed, Sep 13, 2023 at 6:13 PM Ashutosh Bapat
<ashutosh.bapat.oss@gmail.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.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Himanshu Upadhyaya
Дата:
Сообщение: Re: CHECK Constraint Deferrable
Следующее
От: Krishnakumar R
Дата:
Сообщение: Small patch modifying variable name to reflect the logic involved