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 1rUIc4-00A313-SW for pgsql-hackers@arkaria.postgresql.org; Mon, 29 Jan 2024 03:47:13 +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 1rUIc4-00BSCK-18 for pgsql-hackers@arkaria.postgresql.org; Mon, 29 Jan 2024 03:47:12 +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 1rUIc3-00BSCC-Nn for pgsql-hackers@lists.postgresql.org; Mon, 29 Jan 2024 03:47:11 +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 1rUIc1-004GjG-7m for pgsql-hackers@lists.postgresql.org; Mon, 29 Jan 2024 03:47:11 +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 40T3l2gm1678193; Sun, 28 Jan 2024 22:47:02 -0500 From: Tom Lane To: Kyotaro Horiguchi cc: jeevan.chalke@enterprisedb.com, andrew@dunslane.net, peter@eisentraut.org, pgsql-hackers@lists.postgresql.org Subject: Re: More new SQL/JSON item methods In-reply-to: <20240129.121200.235012930453045390.horikyota.ntt@gmail.com> References: <451195.1706216300@sss.pgh.pa.us> <65ac43de-8abe-f9ef-1fe8-838ea22e9c45@dunslane.net> <20240129.121200.235012930453045390.horikyota.ntt@gmail.com> Comments: In-reply-to Kyotaro Horiguchi message dated "Mon, 29 Jan 2024 12:12:00 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1678191.1706500022.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sun, 28 Jan 2024 22:47:02 -0500 Message-ID: <1678192.1706500022@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Kyotaro Horiguchi writes: > I have two possible issues in a recent commit. > Commit 66ea94e8e6 has introduced the following messages: >> errmsg("numeric argument of jsonpath item method .%s() is out of range = for type decimal or number", > They seem to be suggesting that PostgreSQL has the types "decimal" and > "number". I know of the former, but I don't think PostgreSQL has the > latter type. Perhaps the "number" was intended to refer to "numeric"? Probably. But I would write just "type numeric". We do not generally acknowledge "decimal" as a separate type, because for us it's only an alias for numeric (there is not a pg_type entry for it). Also, that leads to the thought that "numeric argument ... is out of range for type numeric" seems either redundant or contradictory depending on how you look at it. So I suggest wording like argument "...input string here..." of jsonpath item method .%s() is out of= range for type numeric > (And I think it is largely helpful if the given string were shown in > the error message, but it would be another issue.) Agreed, so I suggest the above. > The same commit has introduced the following set of messages: >> %s format is not recognized: "%s" >> date format is not recognized: "%s" >> time format is not recognized: "%s" >> time_tz format is not recognized: "%s" >> timestamp format is not recognized: "%s" >> timestamp_tz format is not recognized: "%s" > I believe that the first line was intended to cover all the others:p +1 regards, tom lane