Re: How to store in hours:minutes:seconds where hours may be bigger than 24

Поиск
Список
Период
Сортировка
От Christophe Pettus
Тема Re: How to store in hours:minutes:seconds where hours may be bigger than 24
Дата
Msg-id 89F7FA09-888C-4471-9637-AF9877EF34BA@thebuild.com
обсуждение исходный текст
Ответ на Re: How to store in hours:minutes:seconds where hours may be bigger than 24  (Celia McInnis <celia.mcinnis@gmail.com>)
Ответы Re: How to store in hours:minutes:seconds where hours may be bigger than 24
Список pgsql-general

> On Mar 19, 2024, at 19:56, Celia McInnis <celia.mcinnis@gmail.com> wrote:
>
> 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. I really need the number
ofhours rather than the number of hours mod 24. Do I have to make a composite type to get what I want??? 

I'm not seeing that result:

xof=# create table t (i interval);
CREATE TABLE
xof=# insert into t values('25:17:07'::interval);
INSERT 0 1
xof=# select * from t;
    i
----------
 25:17:07
(1 row)

Can you show what you are doing that gets the result you describe?


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

Предыдущее
От: Celia McInnis
Дата:
Сообщение: Re: How to store in hours:minutes:seconds where hours may be bigger than 24
Следующее
От: Tom Lane
Дата:
Сообщение: Re: How to store in hours:minutes:seconds where hours may be bigger than 24