Re: = TRUE vs IS TRUE confuses partition index creation

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Christophe Pettus <xof(at)thebuild(dot)com>
Cc: PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: = TRUE vs IS TRUE confuses partition index creation
Date: 2022-08-16 21:57:36
Message-ID: 1551758.1660687056@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Christophe Pettus <xof(at)thebuild(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2022-08-16 21:58:02 Re: BUG #17349: Function gen_random_uuid duplicates in pgcrypto and core
Previous Message Daniel Gustafsson 2022-08-16 21:40:15 Re: BUG #17349: Function gen_random_uuid duplicates in pgcrypto and core