Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mLmQG-0005ZU-MF for pgsql-general@arkaria.postgresql.org; Thu, 02 Sep 2021 13:06:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mLmQF-0006Xy-Lx for pgsql-general@arkaria.postgresql.org; Thu, 02 Sep 2021 13:06:27 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mLmQF-0006Xq-Cg for pgsql-general@lists.postgresql.org; Thu, 02 Sep 2021 13:06:27 +0000 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mLmQC-0000Un-T5 for pgsql-general@lists.postgresql.org; Thu, 02 Sep 2021 13:06:26 +0000 IronPort-HdrOrdr: =?us-ascii?q?A9a23=3Ad3qViqsbBYIfU85QOTTv1DAu7skDU9V00zEX?= =?us-ascii?q?/kB9WHVpm5Sj5qSTdPRy73DJYUUqKRYdcLe7SdS9qBLnhORICOYqTNSftWXd1V?= =?us-ascii?q?dAT7sSkbcKoQeQeREWn9Q1vcwLT0E9MqyUMbEQt6jHCXyDc+rIt+PnzEnHv4vj?= =?us-ascii?q?JjxWPGdXgulbnn5E4hDyKDwPeOBpP+tDKKah?= X-IronPort-AV: E=Sophos;i="5.84,326,1620684000"; d="scan'208";a="391764581" Received: from 183.35.15.109.rev.sfr.net (HELO localhost) ([109.15.35.183]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Sep 2021 15:06:21 +0200 Date: Thu, 2 Sep 2021 15:06:20 +0200 From: Charles Paperman To: pgsql-general@lists.postgresql.org Cc: Filip Murlak , matgienieczko@gmail.com Subject: jsonpath duplication result Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, I am looking at the documentation and how jsonpath works and I fall on the following example: (On PostgreSQL 12.4, package for Debian 12.4-3): SELECT jsonb_path_query(j, '$.**.a.**.b') FROM (SELECT '{"a":{"a":{"b":{"c":3}}}'::jsonb as j) as T; The result: jsonb_path_query ------------------ {"c": 3} {"c": 3} (2 lignes)