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 1tnAs4-002qkT-1A for pgsql-bugs@arkaria.postgresql.org; Wed, 26 Feb 2025 06:26:16 +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 1tnAs2-00GXoQ-NK for pgsql-bugs@arkaria.postgresql.org; Wed, 26 Feb 2025 06:26:14 +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 1tnAs2-00GXoI-Ef for pgsql-bugs@lists.postgresql.org; Wed, 26 Feb 2025 06:26:14 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tnArx-0008hT-2m for pgsql-bugs@lists.postgresql.org; Wed, 26 Feb 2025 06:26:13 +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 51Q6Q9gb1716557; Wed, 26 Feb 2025 01:26:09 -0500 From: Tom Lane To: Richard Guo cc: Bruce Momjian , David Rowley , Ronald Cruz , pgsql-bugs@lists.postgresql.org, Peter Ford , "Aaron J. Garcia" Subject: Re: Query result differences between PostgreSQL 17 vs 16 In-reply-to: References: <3736132.1740181858@sss.pgh.pa.us> <3818495.1740191559@sss.pgh.pa.us> Comments: In-reply-to Richard Guo message dated "Wed, 26 Feb 2025 15:14:25 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1716555.1740551169.1@sss.pgh.pa.us> Date: Wed, 26 Feb 2025 01:26:09 -0500 Message-ID: <1716556.1740551169@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Richard Guo writes: > Here is the patch. Thanks for that. The code and comment added to restriction_is_always_true look good, but I can't help wondering whether we don't need the same in restriction_is_always_false. Not very sure what a query proving the need for that would look like, but leaving it asymmetric feels wrong. regards, tom lane