Re: BUG #18637: CREATE INDEX won't look up operator classes in search_path if PARTITION BY is specified

Noah Misch <noah@leadboat.com>

From: Noah Misch <noah@leadboat.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: David Rowley <dgrowleyml@gmail.com>, usamoi@outlook.com, pgsql-bugs@lists.postgresql.org
Date: 2024-10-04T02:33:37Z
Lists: pgsql-bugs
On Thu, Oct 03, 2024 at 02:17:15PM -0400, Tom Lane wrote:
> This could stand an additional regression test case perhaps,
> but the core tests don't have a suitable opclass at hand.
> Maybe we could test it in some contrib module, but that
> seems a shade hacky.
> 
> Thoughts?

For contrib/citext/sql/create_index_acl.sql, I settled on testing in contrib.
I valued the test fidelity of a real opclass more than I disliked the use of
contrib.  The distinction between the various parts of check-world is blurry
to non-hackers, so I expect it won't bother them.



Commits

  1. Use generateClonedIndexStmt to propagate CREATE INDEX to partitions.