From: | Ken Tanzer <ken(dot)tanzer(at)gmail(dot)com> |
---|---|
To: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Sebastien Flaesch <sebastien(dot)flaesch(at)4js(dot)com>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Intervals and ISO 8601 duration |
Date: | 2023-01-14 06:17:27 |
Message-ID: | CAD3a31XAyj9Uj36irm7aV22d2JL2Bx7rvdUiq6h9Am+oR606Zg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, Jan 13, 2023 at 9:27 PM Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)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
*http://agency-software.org/ <http://agency-software.org/>*
*https://demo.agency-software.org/client
<https://demo.agency-software.org/client>*
ken(dot)tanzer(at)agency-software(dot)org
(253) 245-3801
Subscribe to the mailing list
<agency-general-request(at)lists(dot)sourceforge(dot)net?body=subscribe> to
learn more about AGENCY or
follow the discussion.
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2023-01-14 06:19:04 | Re: does refreshing materialized view make the database bloat? |
Previous Message | jian he | 2023-01-14 06:04:13 | does refreshing materialized view make the database bloat? |