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 1iKi1T-0005IH-8c for pgsql-general@arkaria.postgresql.org; Wed, 16 Oct 2019 12:03:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iKi1Q-0007VY-Br for pgsql-general@arkaria.postgresql.org; Wed, 16 Oct 2019 12:03:20 +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 1iKi1P-0007Us-Uj for pgsql-general@lists.postgresql.org; Wed, 16 Oct 2019 12:03:20 +0000 Received: from mout.kundenserver.de ([212.227.17.10]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iKi1I-0002fY-7j for pgsql-general@lists.postgresql.org; Wed, 16 Oct 2019 12:03:18 +0000 Received: from [10.8.0.75] ([185.40.248.10]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPSA (Nemesis) id 1MQMqN-1igWFx2E8v-00MNRh for ; Wed, 16 Oct 2019 14:03:08 +0200 X-Mozilla-News-Host: news://news.gmane.org:119 To: pgsql-general@lists.postgresql.org From: Thomas Kellerer Subject: A little confusion about JSON Path Message-ID: <8dcb9b9d-4863-b7e9-c3dc-e4ab2d01e918@gmx.net> Date: Wed, 16 Oct 2019 14:03:06 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:lvieZuY7gzCBv5usF81skmBg+6F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LynVIJM7h9P1vQqiQjzsf+KO6c7zINNHu1vFUjt774KACIEQiiGvB f9LpfQosJPTnt2ZbW4q1Lk7xPL5azIzsHaOX5ygjU= List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hello, I don't understand why the following two JSON Path expressions aren't doing the same thing in Postgres 12: with sample (data) as ( values ('{"k1": {"list":[1,2,3]}}'::jsonb) ) select data, jsonb_path_exists(data, '$.k1.list.type() ? (@ == "array")'), -- returns true as expected jsonb_path_exists(data, '$.k1.list ? (@.type() == "array")') -- returns false - not expected from sample; Apparently "@.type()" returns something different then "$.k1.list.type()" But maybe I simply don't understand how the @ is supposed to work. Regards Thomas