Re: Implicitly created operator family not listed by pg_event_trigger_ddl_commands
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>, Alvaro Herrera <alvherre@alvh.no-ip.org>, LEMAIRE Leslie (Chargée de mission) - SG/SNUM/UNI/DRC <leslie.lemaire@developpement-durable.gouv.fr>, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2022-05-20T08:51:22Z
Lists: pgsql-bugs
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix DDL deparse of CREATE OPERATOR CLASS
- 70f70d7d3f58 10.22 landed
- 6c6ea6ea81eb 11.17 landed
- 6029861916e8 15.0 landed
- 58b088a9b3c2 14.4 landed
- 4492e73a66bf 12.12 landed
- 3753a169e110 13.8 landed
-
Backpatch regression tests added by 2d689babe3cb
- fa51cc86c684 10.22 landed
- daf015fd0c1d 11.17 landed
- ac78cec9811b 12.12 landed
- 99867e727722 13.8 landed
On Thu, May 19, 2022 at 2:26 PM Michael Paquier <michael@paquier.xyz> wrote: > > On Fri, May 06, 2022 at 02:26:42PM +0900, Masahiko Sawada wrote: > > DefineOpClass() calls CreateOpFamily() to create the operator family > > but in CreateOpFamily() we don't report the new object to event > > triggers. The event by CREATE OPERATOR FAMILY is normally reported by > > ProcessUtilitySlow(). I've confirmed this happens on all supported > > branches. I've attached a patch to fix it. > > Hmm. It looks like it makes sense to back-patch that. > Yeah, I also don't see a reason to not backpatch this. > That's indeed > a bit surprising to not have an event trigger inform about both. > > +-- CRAETE OPERATOR CLASS without FAMILY clause should report > +-- both CRAETE OPERATOR FAMILY and CRAETE OPERATOR CLASS > Got the same typo here, repeated three times. > > - tmpAddr = CreateOpFamily(stmt->amname, opcname, > + tmpAddr = CreateOpFamily(&opfstmt, stmt->amname, opcname, > namespaceoid, amoid); > CreateOpFamily() does not need its second argument now that you pass > down a CreateOpFamilyStmt as first argument, no? > Right, apart from the patch looks good to me. -- With Regards, Amit Kapila.