Re: = TRUE vs IS TRUE confuses partition index creation
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Christophe Pettus <xof@thebuild.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2022-08-16T21:57:36Z
Lists: pgsql-bugs
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
Commits
-
Fix subtly-incorrect matching of parent and child partitioned indexes.
- e6dbb48487fa 16.0 landed
- 2a42c1c51d15 15.0 landed
- 9f0073ef7dac 13.9 landed
- 3bfea5cbba98 14.6 landed
- 2cf16cd7497d 12.13 landed
- 116f20f92656 11.18 landed