From: Tom Lane <tgl@sss.pgh.pa.us>
To: Christophe Pettus <xof@thebuild.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: = TRUE vs IS TRUE confuses partition index creation
Date: Tue, 16 Aug 2022 17:57:36 -0400
Message-ID: <1551758.1660687056@sss.pgh.pa.us> (raw)
In-Reply-To: <8864BFAA-81FD-4BF9-8E06-7DEB8D4164ED@thebuild.com>
References: <8864BFAA-81FD-4BF9-8E06-7DEB8D4164ED@thebuild.com>
Christophe Pettus <xof@thebuild.com> writes:
> When an index is created on the root of a (declarative) partitioned table, that index is also created on the children, unless there is an existing index on that child that matches the definition of the new index. It seems that using `= TRUE` confuses it, compared to `IS TRUE`.
IIRC, "b = true" will be simplified to just "b" somewhere in expression
preprocessing. I'm betting that something in the partitioned index
matching code is applying that preprocessing to one index predicate and
not the other, whereupon they look different. If that's the explanation,
there are likely other cases that should match and fail to.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, xof@thebuild.com, pgsql-bugs@lists.postgresql.org
Subject: Re: = TRUE vs IS TRUE confuses partition index creation
In-Reply-To: <1551758.1660687056@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox