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 1rL8Q9-006HZV-9p for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Jan 2024 21:05:01 +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 1rL8Q7-0080hF-IM for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Jan 2024 21:04:59 +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 1rL8Q7-0080fS-8t for pgsql-hackers@lists.postgresql.org; Wed, 03 Jan 2024 21:04:59 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rL8Q4-00FOWn-O1 for pgsql-hackers@lists.postgresql.org; Wed, 03 Jan 2024 21:04:58 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 884553200A1D; Wed, 3 Jan 2024 16:04:54 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Wed, 03 Jan 2024 16:04:54 -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=fm1; t=1704315894; x=1704402294; bh=Rb6f6M/d+Kwg1rTN/UMkC2Rx4pY+InH0 feh4s3x8ve4=; b=UQAd8CQblnF1L/gY19znOWpQV4dxiUwFrqK2FuxPf+5EJ4l6 63S1KgpffBn9hn8ynvvRgqukAZzaripo+oJ2V11ewE6L92bEGRKR8mDTT7tGGRHZ kDeB7KurPROuhl+aJfCgYYhiQcRctaUgRNyo6b9LkPZ+f1qVK9H5ZDKKboKlWtN+ ZxejIDdbdheAQOXD389x5vyX51Oqj9MCNdnNeyPzY9JXjLPZWLENMS3Hj5n3NKXn C3yPKAAG1ALN/8iWIVERidO/jIw7rFkIs3yPAItQqn2JjjTrxJq6coGjEx5NMiLP 42wzya9y50b9zsCuVGS+pt7gI6vBBNdDv52wuw== 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=fm2; t=1704315894; x= 1704402294; bh=Rb6f6M/d+Kwg1rTN/UMkC2Rx4pY+InH0feh4s3x8ve4=; b=9 lg6nH5fE7qomuUgoARnaKrR2DwXSd+MVaXxf8+NfDHKI/wG3WxjLE8bZ9USlE1wQ 1x/qFA4oXnl/RYuhJf3yWE/X3RrZzGnNWFmiAd5K4i85ZhCxNImiJBu31rg4o2vk URQ5b3X4WLNymwSpjY/wMdNRt5wBmBacvMs1UT9AONAmi15OqBaJZAkOmAndhcgN 3/xz2LMUOklx9iOcIwsAe3yiewkam5T0anI7rVRGHax+PdwLrG+0f9MF3EAhPnTc yqov+THbXdb8S9XzlqGg50Aq5XDEFwWZIC4CUXBBhEq8Y6PYILaU4G//G44owBY4 ZGYlcm6drCTdFIODatP9A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdeghedgudegiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuhffvvehfjggtgfesthejredttddvjeenucfhrhhomheprfgv thgvrhcugfhishgvnhhtrhgruhhtuceophgvthgvrhesvghishgvnhhtrhgruhhtrdhorh hgqeenucggtffrrghtthgvrhhnpeeljeffheevgfeftdegvdduheffkefgjeevfeehfeef uefgkeehjeffjeeffeffudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehpvghtvghrsegvihhsvghnthhrrghuthdrohhrgh X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 3 Jan 2024 16:04:52 -0500 (EST) Message-ID: Date: Wed, 3 Jan 2024 22:04:52 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: More new SQL/JSON item methods Content-Language: en-US From: Peter Eisentraut To: Jeevan Chalke , Andrew Dunstan Cc: PostgreSQL Hackers References: <6d4feb29-6ced-a7b0-2c15-42d3e8e201f7@eisentraut.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 03.01.24 13:01, Peter Eisentraut wrote: > On 07.12.23 14:24, Jeevan Chalke wrote: >> We have the same issue with integer conversion and need a fix. >> >> Unfortunately, I was using int8in() for the conversion of numeric >> values. We should be using numeric_int8() instead. However, there is >> no opt_error version of the same. >> >> So, I have introduced a numeric_int8_opt_error() version just like we >> have one for int4, i.e. numeric_int4_opt_error(), to suppress the >> error. These changes are in the 0001 patch. (All other patch numbers >> are now increased by 1) >> >> I have used this new function to fix this reported issue and used >> numeric_int4_opt_error() for integer conversion. > > I have committed the 0001 and 0002 patches for now. > > The remaining patches look reasonable to me, but I haven't reviewed them > in detail. The 0002 patch had to be reverted, because we can't change the order of the enum values in JsonPathItemType. I have instead committed a different patch that adjusts the various switch cases to observe the current order of the enum. That also means that the remaining patches that add new item methods need to add the new enum values at the end and adjust the rest of their code accordingly.