Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ieVPi-0006Qn-S7 for pgsql-bugs@arkaria.postgresql.org; Tue, 10 Dec 2019 02:38:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ieVPh-00013m-GE for pgsql-bugs@arkaria.postgresql.org; Tue, 10 Dec 2019 02:38:13 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ieVPh-00013f-4V for pgsql-bugs@lists.postgresql.org; Tue, 10 Dec 2019 02:38:13 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ieVPe-0003wu-Rt for pgsql-bugs@lists.postgresql.org; Tue, 10 Dec 2019 02:38:11 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id F289A22649; Mon, 9 Dec 2019 21:38:09 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 09 Dec 2019 21:38:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=DfHJQFJWZ6xhdtwthlelmbE8LcF 0Nc7imId+0+XxI9U=; b=SCeieJDfL9ercR/ODYSgqdOctcwX23JDN9HalVGPcKB 57FJXjm17rlwPgsLu1MdWv24dNYr64UwMpR6HBCkB+9/mHaRRmUx9RHxH/25fcTd jHwsXKEEWINyxzO22RSlTC/BgkhM3UJmG+aG6U/C6fVTYRBg5UCSvEqmpfA0EZkB gHJFtH5b6IDXtgKOzp9dv9AIPMU3+6LE4b5sCgfvPi5W2LJzYCeq6LFnPtTEmC9a JlzGajdK5fTQOf6iBUAqVZl2KJDXP+qSoI6W21nVM57ByK2g+0aYmd5rf2j39pgi WVBZ9j5aCY8WZoReacHwCi90jJW9OwYvpmdZ1yfmEsw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=DfHJQF JWZ6xhdtwthlelmbE8LcF0Nc7imId+0+XxI9U=; b=YbF2SI5DNnnaOgkg/ExaNX SLlUjfGW2HSaMs/tHD6UA5KHSmDloN69PW6F1s6l4/fSmfRWoQggJ7sZbPS3MlVE ltwQAM2CuiAOjivz4WeAwa1rcqmUq3OIDGqwOsY+xo4zfEQGGkU6hENxroOLKlXb xSDMVs/7PE20kaDzDlc45hr/KUaf2veXMQHM5BaBxi29joIXHlUe9S07Jr+enl1f Q0ctn7VlR1XtSNRW2t9o4ZnMy7NPzg4pHtbjLa1Clr5CI9cqnE+NLtZYtF7uCu2h u+C6U/GGvO5o3dGMa98SV/MwUQSab9Uc70JKmM0dBsYibobNql09QeaFXK/+eBlg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrudelvddggeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt jeenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucfkphepudduuddruddtvddrudektddrudekheenucfrrghr rghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiienucevlh hushhtvghrufhiiigvpedt X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id 0909A8005B; Mon, 9 Dec 2019 21:38:07 -0500 (EST) Date: Tue, 10 Dec 2019 11:38:05 +0900 From: Michael Paquier To: Jan =?utf-8?Q?Przemys=C5=82aw_W=C3=B3jcik?= Cc: pgsql-bugs@lists.postgresql.org, Nikita Glukhov , Alexander Korotkov Subject: Re: Unexpected extra row from jsonb_path_query() with a recursive path Message-ID: <20191210023805.GF72921@paquier.xyz> References: <20191209072856.GA71819@paquier.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="f5QefDQHtn8hx44O" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --f5QefDQHtn8hx44O Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 09, 2019 at 09:37:23AM +0100, Jan Przemys=C5=82aw W=C3=B3jcik w= rote: > Yes, there is the only object with the attribute 'key' and its value > should be returned. Note, that a non-recursive path on the same JSON > correctly returns a single row: >=20 > select jsonb_path_query('{"data": [{"key": "value"}]}', '$.*.key') >=20 > jsonb_path_query > ------------------ > "value" > (1 row) Yeah, that result is right. Something looks wrong regarding the lookup of an array's elements when doing a recursion. Let's wait a bit to see if Nikita or Alexander have anything to share as they implemented the feature. If not, I'll try to take a closer look at this issue. -- Michael --f5QefDQHtn8hx44O Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl3vBQ0ACgkQnvQgOdby QH2jmxAApVALHDeWsZ7RDWQUUHIYOGHUEu2JHbdhpPZAL3xFouCm+dXJwHeMRcKd TaDBpvO/0TsZUImezkR1gUY7xQ9z+zLHJBXrGAWKnCL/4gswlfHxSXs/NrDIeqV5 Ge3w3CD5t7YZYwiI7pIuTCV2cT3QNb2aSS88ufohUy4HR7frljEBPn+A7+g1/OnH DDgt76qj15dYUMxiQCFr6ZWcabj3Doen9ny30KpZEzsNIGC0nCowQyycXFXFcooC +6+YQvubS29Rac8Z1wcelb5kI0CepCueOqF6Tud7v3uTynB7pF6sYoMKc0N5lXBp JlNaiKVk3gPGUvUalAqOo5Qt6f6ti+YpBMaDK+utaTvTGvdVrIImBrqnWJrdEy+u mm152nvekbQgJ0MjffQBW3XjWhIOtcd2p7KQq1gzIPuodFJkOM9xAgqw5ki3kmB5 WvUHB1CMdYXOnVTxhlBJIaDKlsahuF6pqZDMdi8+12r8kOMJ7nyuMSGRXg/C8oh/ 7gZ5GA0jShKv6fCTofFk6QvsbRofHQFuwdBnFLZcVciyHM8lmsSdQIkuXJOSeviW bd0fjbqCfnwI9A9YqiuRYhtaN87gR4YazWaI16F1bXRooI6wBobtQhcBxayb11Mi 48HzIAlXS/s9Hgao/r5MIB2JKoL1/pdYXGPimICrLBNZmi1U2Pc= =wPPI -----END PGP SIGNATURE----- --f5QefDQHtn8hx44O--