From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Celia McInnis <celia(dot)mcinnis(at)gmail(dot)com> |
Cc: | Steve Baldwin <steve(dot)baldwin(at)gmail(dot)com>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: How to store in hours:minutes:seconds where hours may be bigger than 24 |
Date: | 2024-03-20 03:02:49 |
Message-ID: | 4102096.1710903769@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Celia McInnis <celia(dot)mcinnis(at)gmail(dot)com> writes:
> Thanks for the suggestion, Steve, but No - when I insert 25:17:07::interval
> into my table I get 01:17:07 into the table - i.e., it replaces 25 hours by
> (25 mod 24) hours or 1 hour, and this is not what I want.
There is definitely something you are not telling us, because it
works in isolation:
regression=# create table t (f1 interval);
CREATE TABLE
regression=# insert into t values ('25:17:07'::interval);
INSERT 0 1
regression=# select * from t;
f1
----------
25:17:07
(1 row)
What's the full context of your problem?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Celia McInnis | 2024-03-20 03:07:12 | Re: How to store in hours:minutes:seconds where hours may be bigger than 24 |
Previous Message | Christophe Pettus | 2024-03-20 03:01:27 | Re: How to store in hours:minutes:seconds where hours may be bigger than 24 |