Re: Intervals and ISO 8601 duration

Поиск
Список
Период
Сортировка
От Ken Tanzer
Тема Re: Intervals and ISO 8601 duration
Дата
Msg-id CAD3a31XAyj9Uj36irm7aV22d2JL2Bx7rvdUiq6h9Am+oR606Zg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Intervals and ISO 8601 duration  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general
On Fri, Jan 13, 2023 at 9:27 PM Adrian Klaver <adrian.klaver@aklaver.com> wrote:
On 1/13/23 17:24, Ken Tanzer wrote:
 
> -[ RECORD 1 ]-+---------------
> i1            | 1 day 02:00:00
> i2            | 26:00:00
> i1_months     | 0
> i1_days       | 1
> i1_msec       | 7200000
> i2_months     | 0
> i2_days       | 0
> i2_msec       | 93600000
> equals        | t
> identical     | f
> i1_msec_total | 93600000
> i2_msec_total | 93600000

I don't see how the above answers, from your previous post, the below:

1) Is the internal representation in months, days and microseconds
different for these two intervals?
2) (If no, what else is it that makes them non-identical?)
3)  Is there a way to access the internal representation?

What you have done is reformat the intervals and establish that the
formatted values point back at equal and most probably identical values.

Well technically it's reformatted, but in a way that apparently will equal the internal representation.  So this helped me see what isn't identical about the two, while still being equal.  So the answers are

1) Yes.  (Months/Days/Ms 0/1/7200000 vs 0/0/93600000)
2) n/a
3) Yes, there's a way (or at least a functional equivalent) if you do some calculating... :)

Cheers,
Ken

 
 --
AGENCY Software  
A Free Software data system
By and for non-profits
(253) 245-3801

learn more about AGENCY or
follow the discussion.

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

Предыдущее
От: jian he
Дата:
Сообщение: does refreshing materialized view make the database bloat?
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: does refreshing materialized view make the database bloat?