Re: Intervals and ISO 8601 duration

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Ken Tanzer <ken(dot)tanzer(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: 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-13 22:41:08
Message-ID: 53c0b4d4-b80a-a35b-ce18-61058794c9bb@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 1/13/23 14:17, Ken Tanzer wrote:
> On Thu, Jan 12, 2023 at 7:08 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us
> <mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us>> wrote:
>
> What Postgres actually stores for an interval is three fields:
> months, days, and microseconds.
>
>
> Is there a way to view/extract this raw data for any given interval?
>
> (I'm asking because of an issue that came up about intervals that were
> "equal but not identical.")

1) Can you provide an example?

2) I don't know how to reverse an output interval to it's input value.

>
> Cheers,
> Ken
>
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ken Tanzer 2023-01-13 22:47:53 Re: Intervals and ISO 8601 duration
Previous Message Ken Tanzer 2023-01-13 22:17:48 Re: Intervals and ISO 8601 duration