Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mtBB1-0001vF-Pw for pgsql-general@arkaria.postgresql.org; Fri, 03 Dec 2021 16:12:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mtBB0-0008UY-LL for pgsql-general@arkaria.postgresql.org; Fri, 03 Dec 2021 16:12:46 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mtBB0-0008UO-6y for pgsql-general@lists.postgresql.org; Fri, 03 Dec 2021 16:12:46 +0000 Received: from mx0c-001a4c01.pphosted.com ([67.231.158.153]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mtBAx-0002bO-3o for pgsql-general@lists.postgresql.org; Fri, 03 Dec 2021 16:12:45 +0000 Received: from pps.filterd (m0210019.ppops.net [127.0.0.1]) by mx0c-001a4c01.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 1B3Ewa40006833; Fri, 3 Dec 2021 11:12:39 -0500 Authentication-Results: ppops.net; spf=pass smtp.mailfrom=sebastien.flaesch@4js.com; dkim=pass header.d=ourvolaris.onmicrosoft.com header.s=selector2-ourvolaris-onmicrosoft-com Received: from mail.ourvolaris.com ([206.25.40.41]) by mx0c-001a4c01.pphosted.com (PPS) with ESMTPS id 3cqj5pa9da-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 03 Dec 2021 11:12:38 -0500 Received: from VOL-SLO-EXCH4.vgnet.volgrp.com (172.23.0.54) by VOL-SLO-EXCH3.vgnet.volgrp.com (172.23.0.53) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 3 Dec 2021 16:12:36 +0000 Received: from EUR02-VE1-obe.outbound.protection.outlook.com (104.47.6.53) by VOL-SLO-EXCH4.vgnet.volgrp.com (172.23.0.54) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Fri, 3 Dec 2021 16:12:35 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VN/6K8rCyZAU1esnxVuquUnbevYsRuwRaAM/zXcGqQ7TeryjJqYtVyRqn5vvHVnA2JQNrQrMSmxOSwA4ZuE1usQMPZFeLzqIEa0VlNRVl3mi9M1eWWs3YsKv0zWnmKd+cN56DA8WvXwv2sQSAuO4fm+UMXkpK3vRKcSQwxhTXUtysJOMM4DVt3D0ObqpTh1kY+J5U0FC6SRVndw31xTl4EKxi3HOTpCUNfGc44KIkIfhtkGeG18UKyziQgrgSBlJz7sZtqQ8ZLPXbw9HrrRFb29ur1beNh6duX0eHHgcCMOjrq+OBKS+X0Qxn9Zlk1cBm/iaupeBhKTHsuimBvXRaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=hPcgU0e6JJioQc6Prv/SdqKsPHH1HQPetuw2d6Wkxbo=; b=hzQT4uA5cHtIsvQbV9nEKHRy5fHr3V/Vq1kN+zeGswksnzHaW3dsLQz/K0ipf5UiRp5pKXdWXeNAzjA8UwVDVtrChsnWZqeBdRHVjGiS8Z/ewsD4WQXRXGMYUJfvx4rVzKL+uzCVINiI83nEc04K1mmZGqInsbFR1EtDl4ALtk6Ksewos/SDLwOhTpoXHrWFdaa5l8KYUZqxI3988LDQcP3S6DK4S9n22SSWXrpBNVBR1Y/33YewiF8lYfZZqARzQWGluCarqsRb7OA9S4XvpRz353TMNqor8ujUeRoDqvOFlSRHPKhzbugAGRZJdcLAAFwoutYFUd2/PDLyYWS5ag== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=4js.com; dmarc=pass action=none header.from=4js.com; dkim=pass header.d=4js.com; arc=none Received: from DBAP191MB1289.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:1c9::19) by DB6P191MB0150.EURP191.PROD.OUTLOOK.COM (2603:10a6:4:8d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.16; Fri, 3 Dec 2021 16:12:34 +0000 Received: from DBAP191MB1289.EURP191.PROD.OUTLOOK.COM ([fe80::dcd8:bbde:ef05:1d56]) by DBAP191MB1289.EURP191.PROD.OUTLOOK.COM ([fe80::dcd8:bbde:ef05:1d56%4]) with mapi id 15.20.4734.028; Fri, 3 Dec 2021 16:12:36 +0000 From: Sebastien Flaesch To: Tom Lane CC: pgsql-general Subject: Re: SUM() of INTERVAL type produces INTERVAL with no precision Thread-Topic: SUM() of INTERVAL type produces INTERVAL with no precision Thread-Index: AQHX6DNFbKPAlSS86kuQrgle4k288qwg4NgAgAAJ3BmAAAXSNw== Date: Fri, 3 Dec 2021 16:12:36 +0000 Message-ID: References: <2292656.1638544536@sss.pgh.pa.us> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: suggested_attachment_session_id: 3270ef12-7d36-15f3-3785-87105abd7526 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 8c879b0b-07d0-4c7f-584a-08d9b677b8cc x-ms-traffictypediagnostic: DB6P191MB0150: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: L2wkxtNyDuVMGRXKjam1XrpMLgrr/yCGuKyu4k2IoYbMfjm6bD+I8M0eAMavs2tDc0fSl0DmIWdkucYrZSC4STK+JJAR5RhyfVAZ/cs3c3+A+DEoe50ERL/t/TnldH1QkUqdPy7rWGSAbmGnIIVwtehmo+5QrSqYUPc1QCg7asPvTrsjvm6QakWBa737/g6dVJfZY7egJk1nFL6v7TpjsjqeZFWgDnXnq0IMArAIAXNed4U/UR5MIm6N90tDbiD4SQOKMRT/HXHC++9UPX8FGC03w+LObTA1Bh4oPfIavbcO8+iyRWo8J9/3XGOlIUe/f6OE2MP87WTyRNKMBod9sbaOYfLRjYGQ5qyMyrhOLv2m0wxicz2czi/8dv9U72FCSKm3UwMklG/ID2E5AUwhrdxUUa9E0GG0GSv9xCW87KR/epkPlahVh6/zHeY/vHrN9vOLg66XyalrK3viNe/Iyh0piJFej7nntvZDEXhwYcVEWXwVtDZE9XRJGDK6A5zkte663tUneC02lLrnk0J2JyXiRARecjbuylaCWIbwemXMOubWmbErgitiS4MmccOdsupK5cChqp7oi5qYfnPV/UEedPDjx/wjWICr3UbJ/xIWYdFs/4PTyDWypFKSrGnP612XIXBW7QkuT7i0dQ4HsCw0VQ4mizqDDgmimkkob4tBYVZc3IDiLyv4B8XVIkaNvh/YwcurGrbAuqz8zmB2gw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DBAP191MB1289.EURP191.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(4636009)(366004)(66476007)(4326008)(2940100002)(2906002)(9686003)(508600001)(122000001)(5660300002)(44832011)(8936002)(316002)(86362001)(7696005)(8676002)(64756008)(66556008)(83380400001)(26005)(55016003)(6916009)(66446008)(33656002)(38070700005)(91956017)(71200400001)(76116006)(6506007)(186003)(66946007)(19627405001)(38100700002)(53546011)(52536014);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?EyTSsV6SZZK2efAFNxMAq/53U0FqClCYfJQ7eY6ZjaJUNusC2Lhea9Cfjp/P?= =?us-ascii?Q?pJFf1YugcnFqGKMPKbtKzc7dAMY0OdurrmklIfMNIus2HF+kaJsQ+apskz/M?= =?us-ascii?Q?K5KxkDpcPu/kdCZvVV4cK3Pz3/CX08YpsGreYO6J7iOzjAnwfixOhJ6VFOxO?= =?us-ascii?Q?1SM0oZmumPwiKuq9QXAn3jjZnbG2ox1Q4b5bEgk6AwGLRUp6JQkcopKAfiZw?= =?us-ascii?Q?diClqmWMKNkSBEc11bKw010UDibiu61e5tjRCXzZPy6gItZMZPapAI2nThzG?= =?us-ascii?Q?a+ikEMqqRxg8KBLMD+kVyI19c4/BijZ+Og747WJMF6wectDZGUbD74hQP4UA?= =?us-ascii?Q?jsBwRIJSFVyF55O+tHcfz74l4sszp6P9Q1AHDP2kZ6sCeBmztpMKtCJ7+xCA?= =?us-ascii?Q?wR3xkUm1Nd6HO2Lz1kQ14/wDE5k4sIKUQvTYJXLWcYqMAhLhF628MjJ8vuLr?= =?us-ascii?Q?DLLla0kBskeSvKQKRRYD4WdHdi5Pa4tfYRjvHDTWkaJlTEWm3juqe17i7k+D?= =?us-ascii?Q?Vt4xneD6npiwsvTHBwgEgNYHcmTd+EKYlANBezO7DzOeQvpiD/ViOPjhsecL?= =?us-ascii?Q?bKtWJWV6QOlAuqhA4GcCzuNt3iWzLukpt6FCpMnZAAsSV/9BYe0Uo2+Halmh?= =?us-ascii?Q?Xqp2eIHXm9pyG2VL+a31keu1NiWrCTBDGDBXWhSSgFXpKPLjuMO2ufhQLj5u?= =?us-ascii?Q?5+FIowtiBnFXfr3lILtGPZffdCb6fqvDBfnVXV+nzELhTcojCbyI/mfVyUqI?= =?us-ascii?Q?8nO39PBnyrzrR64vfkRb5ZHbzrYT2Cd8I4HH2LRVGKhpPUUBtk0LhmCulDT6?= =?us-ascii?Q?B7ITWQFmQNZs+4PSkcy0IzMAvncyVX5Sn7EBvPDjsskr1EoevJLoTHnCaHhN?= =?us-ascii?Q?B4I76c37P3DKyIyyqO+nDYubhx2amxjLQCpkBhTB3Oh2xVS7t3VaKSM2islg?= =?us-ascii?Q?K9ki0R4DImcVdhOt839+0gnALnAOe117RtBPFFgajM4NSw+EG5ig3nh3+qmi?= =?us-ascii?Q?JVjkF04TmkhCnisRuf6NYGmtdyKp7wM2sY+KB68k3Ci/okBvfRvENFaqGWz4?= =?us-ascii?Q?rAIX7CZg5ZWF9Zj9UCUH/83m2ntz6aqlwMk1QIfNrz9JXRDSyRyDBMFRHno3?= =?us-ascii?Q?WHhN9fMesSgNxWJ7PPX8kUg/ASEt07Cj1E7Eh9shhYXTIXOpvJuXfch/ik10?= =?us-ascii?Q?MM2kBpgFioM5ab8DL4DqwdKyAeWgpSPMAu2HI/3R+QQc2Gja+t49kVXRxm71?= =?us-ascii?Q?Df/wrFtubmyaewnfP08j+dKoO/udY12iihkYtZ0gcRLO5KujOqqXAlVkqIdW?= =?us-ascii?Q?QkA1QrQwnqjFkP2/7Z8wGGwD0czhncAeMRtiDGs3pKxsldn5lFQv3Go4Wpkm?= =?us-ascii?Q?qACUCo6Cr3mmJ59T0ttwq+ArRN98DuVzM7HnmMzxTDGjkuyg9AmB5wyS3Yq9?= =?us-ascii?Q?3DMa2rI4drb+1b+WGSKy+xb/R6ioll684B9gx2uFzumpUcTb7x9MOm88ydqJ?= =?us-ascii?Q?7yz4AgYUMgZ6tGemjahz6gtpudo7q5wfI2u+7/GoKGGZ4SsKZdIxOQRQJFx1?= =?us-ascii?Q?1tDdq4javWDsc18szNTgYwdEpMXyRf9IvqLduH75ZxxMNwgatHlrq/aSDSfB?= =?us-ascii?Q?CmfkilIaD9bQ/80Q2APDHlsSpmkhKVVSvM14IboYHZwGdHAiLVqaSo/JT75a?= =?us-ascii?Q?R2lAIA=3D=3D?= Content-Type: multipart/alternative; boundary="_000_DBAP191MB128944EC48D51CB1C34D3EB8B06A9DBAP191MB1289EURP_" MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DBAP191MB1289.EURP191.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 8c879b0b-07d0-4c7f-584a-08d9b677b8cc X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Dec 2021 16:12:36.6262 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 75c696ec-5bfb-4892-9a0c-9187a9061cd6 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: UTLRDfFv6ahGXlN7dMj1Gs9gsEcPSakzc9V8LECY72oui7CC9JivzujFFzoj0wkHDOQL+Lvy2iyFRm1SYX5Xr/sSmSDfNFFIR+YcKamIIkg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6P191MB0150 X-OriginatorOrg: 4js.com X-C2ProcessedOrg: 2f0c79df-a80b-40c2-9362-4c5fa2dae201 X-Proofpoint-ORIG-GUID: mDS6SmW4L00yKzv1N8h5S48v9NRGGoDo X-Proofpoint-GUID: mDS6SmW4L00yKzv1N8h5S48v9NRGGoDo X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2021-12-03_07,2021-12-02_01,2021-12-02_01 X-Proofpoint-Spam-Reason: safe List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --_000_DBAP191MB128944EC48D51CB1C34D3EB8B06A9DBAP191MB1289EURP_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hum.... test1=3D> create table tab2 ( i interval hour to minute ); CREATE TABLE test1=3D> insert into tab2 values ( interval '9999-10 555 11:22:33' ); INSERT 0 1 test1=3D> select * from tab2; i -------------------------------------- 9999 years 10 mons 555 days 11:22:00 (1 row) Expected? Qualifiers "hour to minute" seem just to be some decoration... Seb ________________________________ From: Sebastien Flaesch Sent: Friday, December 3, 2021 5:08 PM To: Tom Lane Cc: pgsql-general Subject: Re: SUM() of INTERVAL type produces INTERVAL with no precision EXTERNAL: Do not click links or open attachments if you do not recognize th= e sender. Hi Tom, I do care because I wrote a database driver/interface that needs to do auto= matic conversions from native PostgreSQL types, to our programming language= types (we sell a compile/runtime system). I need introspection of the fetched data. The more exact type info I get, t= he better. As our software is a programming language runtime system, I don't know in a= dvance the SQL statement and column types. It's all generic code. We have features/APIs that return the type of a SELECT item, like ODBC's SQ= LDescribeCol() ... Our programming language supports Informix-style INTERVALs where you have 2= classes: INTERVAL year-to-month INTERVAL day-to-second[.fractions] It's not easy to explain all the constraints here in a few lines but basica= lly, I can better handle the values returned from PQgetvalue(), when I know= exactly when is the original type from PQftype() and PQfmode() We could help our customer by using a CAST(): SELECT CAST( SUM(col) AS INTERVAL HOUR TO MINUTE) ... After more tests: I have some doubts about the values that can be inserted into a PostgreSQL = INTERVAL. Sorry if I am missing something, but it's quite strange to me that one can = insert various "classes" of interval values: test1=3D> create table tab1 ( i interval ); CREATE TABLE test1=3D> insert into tab1 values ( interval '12434:12:11' ); INSERT 0 1 test1=3D> select * from tab1; i ------------- 12434:12:11 (1 row) test1=3D> insert into tab1 values ( interval '99999 12:11:10' ); INSERT 0 1 test1=3D> select * from tab1; i --------------------- 12434:12:11 99999 days 12:11:10 (2 rows) test1=3D> insert into tab1 values ( interval '9999-10 12:11:10' ); INSERT 0 1 test1=3D> select * from tab1; i ----------------------------- 12434:12:11 99999 days 12:11:10 9999 years 10 mons 12:11:10 (3 rows) test1=3D> insert into tab1 values ( interval '9999-10 55 12:11:10' ); INSERT 0 1 test1=3D> select * from tab1; i ------------------------------------- 12434:12:11 99999 days 12:11:10 9999 years 10 mons 12:11:10 9999 years 10 mons 55 days 12:11:10 (4 rows) How much days is is 9999 years 10 months 55 days? A month can have 30, 31, 28 or 29 days ... I must carefully read the doc again. Thanks for you answer(s) Seb ________________________________ From: Tom Lane Sent: Friday, December 3, 2021 4:15 PM To: Sebastien Flaesch Cc: pgsql-general Subject: Re: SUM() of INTERVAL type produces INTERVAL with no precision EXTERNAL: Do not click links or open attachments if you do not recognize th= e sender. Sebastien Flaesch writes: > When doing a SUM( ) aggregate on an INTERVAL HOUR TO SECOND(0) column, th= e resulting type loses the interval type qualifiers... We don't generally attribute a typmod (which is what interval field specs are) to the output of any function, other than the ones that are specifically identified in the catalogs as cast-to-a-particular-typmod infrastructure. Why do you care? The value is the same regardless. > The type of a SELECT item is important to us because we have generic C co= de that identifies the PQfmod() type, to properly interpret the string valu= e returned by PQgetvalue(). I think you have vastly overestimated the value of PQfmod. Moreover, if you think you need it to interpret the output data, you are mistaken. There is no situation in which Postgres output formats are typmod-specific; in fact, the output function API doesn't even pass the typmod. regards, tom lane --_000_DBAP191MB128944EC48D51CB1C34D3EB8B06A9DBAP191MB1289EURP_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hum....

test1=3D> create table tab2 ( i interval hour to minute );
CREATE TABLE
test1=3D> insert into tab2 values ( interval '9999-10 555 11:22:33'= );
INSERT 0 1
test1=3D> select * from tab2;
                  i  = ;                
--------------------------------------
 9999 years 10 mons 555 days 11:22:00
(1 row)

Expected?

Qualifiers "hour to minute" seem just to be some decoration...

Seb

From: Sebastien Flaesch <= ;sebastien.flaesch@4js.com>
Sent: Friday, December 3, 2021 5:08 PM
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: SUM() of INTERVAL type produces INTERVAL with no precis= ion
 

EXTERNAL: Do not c= lick links or open attachments if you do not recognize the sender.=


Hi Tom,

I do care because I wrote a database driver/interface that needs to do auto= matic conversions from native PostgreSQL types, to our programming language= types (we sell a compile/runtime system).

I need introspection of the fetched data. The more exact type info I get, t= he better.

As our software is a programming language runtime system, I don't know in a= dvance the SQL statement and column types.

It's all generic code.

We have features/APIs that return the type of a SELECT item, like ODBC's SQ= LDescribeCol() ...

Our programming language supports Informix-style INTERVALs where you have 2= classes:

INTERVAL year-to-month
INTERVAL day-to-second[.fractions]

It's not easy to explain all the constraints here in a few lines but basica= lly, I can better handle the values returned from PQgetvalue(), when I know= exactly when is the original type from PQftype() and PQfmode()

We could help our customer by using a CAST():

SELECT CAST( SUM(col) AS INTERVAL HOUR TO MINUTE) ...

After more tests:

I have some doubts about the values that can be inserted into a PostgreSQL = INTERVAL.

Sorry if I am missing something, but it's quite strange to me that one can = insert various "classes" of interval values:

test1=3D> create table tab1 ( i interval );
CREATE TABLE

test1=3D> insert into tab1 values ( interval '12434:12:11' );
INSERT 0 1

test1=3D> select * from tab1;
      i      
-------------
 12434:12:11
(1 row)

test1=3D> insert into tab1 values ( interval '99999 12:11:10' );
INSERT 0 1
test1=3D> select * from tab1;
          i          = ;
---------------------
 12434:12:11
 99999 days 12:11:10
(2 rows)

test1=3D> insert into tab1 values ( interval '9999-10 12:11:10' );<= /div>
INSERT 0 1
test1=3D> select * from tab1;
              i      = ;        
-----------------------------
 12434:12:11
 99999 days 12:11:10
 9999 years 10 mons 12:11:10
(3 rows)

test1=3D> insert into tab1 values ( interval '9999-10 55 12:11:10' = );
INSERT 0 1
test1=3D> select * from tab1;
                  i  = ;                
-------------------------------------
 12434:12:11
 99999 days 12:11:10
 9999 years 10 mons 12:11:10
 9999 years 10 mons 55 days 12:11:10
(4 rows)


How much days is is 9999 years 10 months 55 days?
A month can have 30, 31, 28 or 29 days ...

I must carefully read the doc again.

Thanks for you answer(s)
Seb




From: Tom Lane <tgl@ss= s.pgh.pa.us>
Sent: Friday, December 3, 2021 4:15 PM
To: Sebastien Flaesch <sebastien.flaesch@4js.com>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: SUM() of INTERVAL type produces INTERVAL with no precis= ion
 
EXTERNAL: Do not click links or open attachments= if you do not recognize the sender.

Sebastien Flaesch <sebastien.flaesch@4js.com> writes:
> When doing a SUM( ) aggregate on an INTERVAL HOUR TO SECOND(0) column,= the resulting type loses the interval type qualifiers...

We don't generally attribute a typmod (which is what interval field
specs are) to the output of any function, other than the ones that are
specifically identified in the catalogs as cast-to-a-particular-typmod
infrastructure.  Why do you care?  The value is the same regardle= ss.

> The type of a SELECT item is important to us because we have generic C= code that identifies the PQfmod() type, to properly interpret the string v= alue returned by PQgetvalue().

I think you have vastly overestimated the value of PQfmod.  Moreover,<= br> if you think you need it to interpret the output data, you are mistaken. There is no situation in which Postgres output formats are
typmod-specific; in fact, the output function API doesn't even pass
the typmod.

            &nb= sp;           regards, to= m lane
--_000_DBAP191MB128944EC48D51CB1C34D3EB8B06A9DBAP191MB1289EURP_--