Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rmmEB-009mZx-Rd for pgsql-general@arkaria.postgresql.org; Wed, 20 Mar 2024 03:02:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rmmEA-0024Xc-8u for pgsql-general@arkaria.postgresql.org; Wed, 20 Mar 2024 03:02:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rmmE9-0024XU-Uw for pgsql-general@lists.postgresql.org; Wed, 20 Mar 2024 03:02:54 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rmmE7-005TVj-Q8 for pgsql-general@lists.postgresql.org; Wed, 20 Mar 2024 03:02:53 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 42K32nCl4102097; Tue, 19 Mar 2024 23:02:49 -0400 From: Tom Lane To: Celia McInnis cc: Steve Baldwin , "pgsql-generallists.postgresql.org" Subject: Re: How to store in hours:minutes:seconds where hours may be bigger than 24 In-reply-to: References: Comments: In-reply-to Celia McInnis message dated "Tue, 19 Mar 2024 22:56:34 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4102095.1710903769.1@sss.pgh.pa.us> Date: Tue, 19 Mar 2024 23:02:49 -0400 Message-ID: <4102096.1710903769@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Celia McInnis 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