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

From Tom Lane
Subject Re: BUG #18637: CREATE INDEX won't look up operator classes in search_path if PARTITION BY is specified
Date
Msg-id 231375.1727925543@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #18637: CREATE INDEX won't look up operator classes in search_path if PARTITION BY is specified  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: BUG #18637: CREATE INDEX won't look up operator classes in search_path if PARTITION BY is specified
List pgsql-bugs
David Rowley <dgrowleyml@gmail.com> writes:
> There's an item in the release notes [1] which should be expended to
> mention this as an incompatibility, namely:

> "Change functions to use a safe search_path during maintenance
> operations (Jeff Davis) §

I have not dug into the code, but I think this may actually be a
bug; not because of the change of search path, but because it looks
like the opclass is probably being looked up more than once during
the command, with different search paths.  That has security
implications, and not good ones.  We should fix this so that the
opclass is looked up exactly once, and passed down to the partitions
by OID not name.

            regards, tom lane



pgsql-bugs by date:

Previous
From: David Rowley
Date:
Subject: Re: BUG #18637: CREATE INDEX won't look up operator classes in search_path if PARTITION BY is specified
Next
From: "David G. Johnston"
Date:
Subject: Fix the description of what Schema Usage controls