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 1rbjyZ-00GlLs-Su for pgsql-bugs@arkaria.postgresql.org; Sun, 18 Feb 2024 16:25:11 +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 1rbjyY-00ALDY-C2 for pgsql-bugs@arkaria.postgresql.org; Sun, 18 Feb 2024 16:25:10 +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 1rbjyY-00ALDP-40 for pgsql-bugs@lists.postgresql.org; Sun, 18 Feb 2024 16:25:10 +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.94.2) (envelope-from ) id 1rbjyR-007O7D-K9; Sun, 18 Feb 2024 16:25:08 +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 41IGOxcS3873395; Sun, 18 Feb 2024 11:24:59 -0500 From: Tom Lane To: David Rowley cc: Amit Langote , Alvaro Herrera , exclusion@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18344: Pruning tables partitioned by bool range fails with invalid strategy In-reply-to: References: <18344-8d3f00bada6d09c6@postgresql.org> <3263261.1708014503@sss.pgh.pa.us> Comments: In-reply-to David Rowley message dated "Mon, 19 Feb 2024 01:53:29 +1300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3873393.1708273499.1@sss.pgh.pa.us> Date: Sun, 18 Feb 2024 11:24:59 -0500 Message-ID: <3873394.1708273499@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk David Rowley writes: > We can do the same for BooleanTests. Given a clause such as: "partkey > IS NOT false", we can just generate the clause "partkey IS true OR > partkey IS NULL" and recursively generate steps for that. +1 ... sounds clean and clearly correct. > I'm tempted to go a bit further in master only and add support for > bool IS NOT UNKNOWN and bool IS UNKNOWN using the same method. These are the same as IS NOT NULL and IS NULL, so I don't see the need for an OR? regards, tom lane