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 1sJZ4X-005aYg-Qs for pgsql-hackers@arkaria.postgresql.org; Tue, 18 Jun 2024 13:40: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 1sJZ4V-00DOgL-9n for pgsql-hackers@arkaria.postgresql.org; Tue, 18 Jun 2024 13:40:28 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sJZ4U-00DOgC-RM for pgsql-hackers@lists.postgresql.org; Tue, 18 Jun 2024 13:40:27 +0000 Received: from 009.lax.mailroute.net ([199.89.1.12]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sJZ4S-001uvL-L5 for pgsql-hackers@lists.postgresql.org; Tue, 18 Jun 2024 13:40:26 +0000 Received: from localhost (localhost [127.0.0.1]) by 009.lax.mailroute.net (Postfix) with ESMTP id 4W3SYg3ZlszlgMVS; Tue, 18 Jun 2024 13:40:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=acm.org; h= content-transfer-encoding:content-type:content-type:in-reply-to :mime-version:user-agent:date:date:message-id:from:from :references:subject:subject:received:received; s=mr01; t= 1718718021; x=1721310022; bh=p7IiLvESUCWpSjC3/IO4cshDUmW2dSTeJMv qLDoADPY=; b=EpkSTYzv4LIW7CARE/Bpwr4KgbNo+w5U40FW/NYOS0NPGAw1zaV PatZU10UEcTgCqqTCMpjwLqj8rGmGP04u75c/HqpEUwzcC5t+bISZcm7lvbHS64u yt3bP2Y4vy9tdq2H5szOLNDHl3O2yvHEfHRTC7UBVS6hchVjpPitZibiTWV6TiDv PIGRpb1/dFrDunHx2cZStISot1Zz6flEDeLnKqVParHXV875u/ZZgo+vtq3btof7 hnPsCVyUOhhbW8hj7WFwfb2AADsVBljeec/J/yriRyi56FdKHMuWa9Kcg2Bj9BI9 WPwWpk1JgXzmtBxxt59WItwNKv9gZKWmcsQ== X-Virus-Scanned: by MailRoute Received: from 009.lax.mailroute.net ([127.0.0.1]) by localhost (009.lax [127.0.0.1]) (mroute_mailscanner, port 10029) with LMTP id nQjmKT-Hg_-b; Tue, 18 Jun 2024 13:40:21 +0000 (UTC) Received: from [73.103.120.3] (c-73-103-120-3.hsd1.in.comcast.net [73.103.120.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: jcflack@acm.org) by 009.lax.mailroute.net (Postfix) with ESMTPSA id 4W3SYc70lCzlgMVR; Tue, 18 Jun 2024 13:40:20 +0000 (UTC) Subject: Re: jsonpath: Missing regex_like && starts with Errors? To: Peter Eisentraut , "David E. Wheeler" References: <9272D3A9-8805-4DE1-A95F-84EB210EC121@justatheory.com> <666CFC8E.1000108@acm.org> <666DBFEC.70201@acm.org> <9BAFB50F-267E-4078-9558-36155E93A723@justatheory.com> <6670BC59.1010204@acm.org> <565BA19A-EC85-4DE0-A21B-A298C358096E@justatheory.com> <6670EE22.60808@acm.org> <6cb5a1cd-333b-449e-87a1-73e3802a3539@eisentraut.org> Cc: PostgreSQL Hackers From: Chapman Flack X-Enigmail-Draft-Status: N1110 Message-ID: <66718E43.409@acm.org> Date: Tue, 18 Jun 2024 09:40:19 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: <6cb5a1cd-333b-449e-87a1-73e3802a3539@eisentraut.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 06/18/24 08:30, Peter Eisentraut wrote: > Are you saying we shouldn't allow .boolean() to be called on a JSON number? > > I would concur that that's what the spec says. Or, if we want to extend the spec and allow .boolean() on a JSON number, should it just check that the number is nonzero or zero, rather than checking that it can be serialized then deserialized as an int4 and otherwise complaining that it isn't a number? Which error code to use seems to be a separate issue. Is it possible that more codes like 2202V non-boolean SQL/JSON item were added in a later spec than we developed the code from? I have not read through all of the code to see in how many other places the error code doesn't match the spec. Regards, -Chap