pg.ddx.io pgsql-general@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Celia McInnis <celia.mcinnis@gmail.com>
Cc: Steve Baldwin <steve.baldwin@gmail.com>
Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: How to store in hours:minutes:seconds where hours may be bigger than 24
Date: Tue, 19 Mar 2024 23:02:49 -0400
Message-ID: <4102096.1710903769@sss.pgh.pa.us> (raw)
In-Reply-To: <CAGD6t7KjZMEKaLYZtcKNjhfDk--GB1M+B_jEUmknhtnB1HTsKg@mail.gmail.com>
References: <CAGD6t7JzcmpQ2m5exP=jN6frCs4uVW80KWiuBuginq6mO3oRRw@mail.gmail.com>
<CAKE1AiYOQPaOGJcVX8KPzyYuHOb-FF6pPPFrRaJdO9-LFverkQ@mail.gmail.com>
<CAGD6t7KjZMEKaLYZtcKNjhfDk--GB1M+B_jEUmknhtnB1HTsKg@mail.gmail.com>
Celia McInnis <celia.mcinnis@gmail.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
view thread (7+ messages) latest in thread
Message-ID: <4102096.1710903769@sss.pgh.pa.us> Permalink: ../4102096.1710903769@sss.pgh.pa.us/ Also on: postgresql.org/message-id/4102096.1710903769@sss.pgh.pa.us ·
reply
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Reply to all the recipients from your mail client; the link fills in the headers below: reply via email Some clients, webmail especially, drop In-Reply-To and References from a link, and the reply then starts a new thread: use the mbox below. To: pgsql-general@postgresql.org Cc: tgl@sss.pgh.pa.us, celia.mcinnis@gmail.com, steve.baldwin@gmail.com Subject: Re: How to store in hours:minutes:seconds where hours may be bigger than 24 In-Reply-To: <4102096.1710903769@sss.pgh.pa.us> References: <CAGD6t7JzcmpQ2m5exP=jN6frCs4uVW80KWiuBuginq6mO3oRRw@mail.gmail.com> <CAKE1AiYOQPaOGJcVX8KPzyYuHOb-FF6pPPFrRaJdO9-LFverkQ@mail.gmail.com> <CAGD6t7KjZMEKaLYZtcKNjhfDk--GB1M+B_jEUmknhtnB1HTsKg@mail.gmail.com> <4102096.1710903769@sss.pgh.pa.us> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox