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 1uwXng-0048Sc-5R for pgsql-bugs@arkaria.postgresql.org; Thu, 11 Sep 2025 03:16:44 +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 1uwXne-004soT-B5 for pgsql-bugs@arkaria.postgresql.org; Thu, 11 Sep 2025 03:16:42 +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 1uwXne-004soJ-2f for pgsql-bugs@lists.postgresql.org; Thu, 11 Sep 2025 03:16:42 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uwXnZ-0007KA-0T for pgsql-bugs@lists.postgresql.org; Thu, 11 Sep 2025 03:16:42 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 58B3GX7M1705247; Wed, 10 Sep 2025 23:16:33 -0400 From: Tom Lane To: Richard Guo cc: Tender Wang , runyuan@berkeley.edu, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #19046: Incorrect result when using json_array() with column reference in subquery combined with RIGHT JOIN In-reply-to: References: <19046-765b6602b0a8cfdf@postgresql.org> Comments: In-reply-to Richard Guo message dated "Thu, 11 Sep 2025 12:10:15 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1705245.1757560593.1@sss.pgh.pa.us> Date: Wed, 10 Sep 2025 23:16:33 -0400 Message-ID: <1705246.1757560593@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Richard Guo writes: > I tested JsonExpr, which is the representation of json_value, > json_query and json_exists. It seems that they could not produce > non-NULL output with a NULL input. So we are good on that front. Seems like we ought to actually look at the relevant code, not try to test our way to an understanding of it. regards, tom lane