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 1rQBfE-00H8QZ-OG for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Jan 2024 19:33:29 +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 1rQBfD-00FCKv-JR for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Jan 2024 19:33:27 +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 1rQBfB-00FCKn-Io for pgsql-hackers@lists.postgresql.org; Wed, 17 Jan 2024 19:33:27 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rQBf7-002LIS-G0 for pgsql-hackers@lists.postgresql.org; Wed, 17 Jan 2024 19:33:25 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 8E4535C00DD; Wed, 17 Jan 2024 14:33:17 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Wed, 17 Jan 2024 14:33:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm2; t=1705519997; x=1705606397; bh=VcmW76GmAzR2ExIpphEBgLeMcdPmTBD5 omBzdcgS1bs=; b=FGVGBQPPVOx+s0Ouos3VW9p8mK598QgRxHd56PKR//iXYuq0 9+XzRnIlz9zdx0yoedyE9DDVXsWQMoijVDx/R3UddB9106X3sUmiNNGSSBjBKNoz eyFaEmgJZot6Qayq8Tjunm20ZV3ycUac9m1jGkCHAYz+HZqBOgGNl6OWOCLmMiej 9iW/PE41P3ijfu9CHwtM9x6wxV/AvJexP1MN4Y1J+cHageqXUWw/JlC7PoeGVMPq rT8xAKAfiIBzxFJXLdiQ64kgYo0FxHOPiUxHHvAYGtZVsuT41IVVta2xMIJDJ+Y3 kB1nL0lOL+JhFZJANUbiE+g5NKkfbki3p5bsVQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1705519997; x= 1705606397; bh=VcmW76GmAzR2ExIpphEBgLeMcdPmTBD5omBzdcgS1bs=; b=R ATInQ+UvFn3Ro3sXIn/wn+OWMYJA0V1O9EFxEyYT7t7hYZRN155vfIjbrz9mOZAd TCqVHZkaWzLZyWrHQz3mXJVYMrhsaWAGsQXToBe8dDbOUGbuwpE115bP3/F2wSZK 8MkT/gASMaF3ImRE0d6sTRs4KBZ5cJuSj27rWlPM/IV9mRCiB4fiovoEcPqE0Dra Io5/7/vyr+DZo2/KqlLflAXhZcFo6MMlQiUQuc0IGw1R1k0R70w/++4KHUYtwMg2 zuL+EP3jiUnIAA9xEiXhMc1/Fbm/WwZIWMBZpHoTI2q6Qoo4wzKJLFAuMO50eBlN HCYoS15/QGZcrpPHiif/A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdejhedguddvtdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfevfhfhjggtgfesthekredttddvjeenucfhrhhomheprfgv thgvrhcugfhishgvnhhtrhgruhhtuceophgvthgvrhesvghishgvnhhtrhgruhhtrdhorh hgqeenucggtffrrghtthgvrhhnpeejhfevhedttefgfffhhfeffefggffhffelgfeiueeu keehvdehvdefheffvdefueenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehpvghtvghrsegvihhsvghnthhrrghuthdrohhrgh X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 17 Jan 2024 14:33:16 -0500 (EST) Message-ID: <1d092c02-8249-4e56-8b8e-ae4db95b8fde@eisentraut.org> Date: Wed, 17 Jan 2024 20:33:14 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: More new SQL/JSON item methods To: Jeevan Chalke Cc: Andrew Dunstan , PostgreSQL Hackers References: <6d4feb29-6ced-a7b0-2c15-42d3e8e201f7@eisentraut.org> Content-Language: en-US From: Peter Eisentraut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 17.01.24 10:03, Jeevan Chalke wrote: > I added unary '+' and '-' support as well and thus thought of having > separate rules altogether rather than folding those in. > > Per SQL standard, the precision and scale arguments are unsigned > integers, so unary plus and minus signs are not supported.  So my patch > removes that support, but I didn't adjust the regression tests for that. > > > However, PostgreSQL numeric casting does support a negative scale. Here > is an example: > > # select '12345'::numeric(4,-2); >  numeric > --------- >    12300 > (1 row) > > And thus thought of supporting those. > Do we want this JSON item method to behave differently here? Ok, it would make sense to support this in SQL/JSON as well. > I will merge them all into one and will try to keep them in the order > specified in sql_features.txt. > However, for documentation, it makes more sense to keep them in logical > order than the alphabetical one. What are your views on this? The documentation can be in a different order.