Search Postgresql Archives

Re: Intervals and ISO 8601 duration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 13, 2023 at 3:44 PM Adrian Klaver <adrian.klaver@xxxxxxxxxxx> wrote:
If I am following what you want is to_char(<interval>,'HH24:MM:SS') to
be equal, correct?

Not really.  My original question was:

[since intervals are stored internally as months, days and microseconds...]

> 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?

And again, I don't want to make anything equal, I'm looking for ways to get info about the non-identicalness.

I think we've established these two intervals are equal but not identical:
  • '1 day 2 hours'::interval
  • '26 hours'::interval2
Given that, my questions:
  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?
And thanks to all of you who have responded!

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.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux