pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: LEMAIRE Leslie (Chargée de mission) - SG/SNUM/UNI/DRC <leslie.lemaire@developpement-durable.gouv.fr>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: Implicitly created operator family not listed by pg_event_trigger_ddl_commands
Date: Thu, 19 May 2022 17:56:09 +0900
Message-ID: <YoYGKWWwrB+8AlV/@paquier.xyz> (raw)
In-Reply-To: <CAD21AoBGqNBe=ydCxSoZnZQw9RA72DbQnTuFOhVDWkvF1wvHXw@mail.gmail.com>
References: <f74d69e151b22171e8829551b1159e77@developpement-durable.gouv.fr>
	<202205041017.uc3dxylntais@alvherre.pgsql>
	<CAD21AoBGqNBe=ydCxSoZnZQw9RA72DbQnTuFOhVDWkvF1wvHXw@mail.gmail.com>

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.  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?
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (13+ messages)  latest in thread

Message-ID: <YoYGKWWwrB+8AlV/@paquier.xyz>
Permalink:  ../YoYGKWWwrB+8AlV%2F@paquier.xyz/
Also on:    postgresql.org/message-id/YoYGKWWwrB+8AlV/@paquier.xyz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: michael@paquier.xyz, sawada.mshk@gmail.com, alvherre@alvh.no-ip.org, leslie.lemaire@developpement-durable.gouv.fr, pgsql-bugs@lists.postgresql.org
  Subject: Re: Implicitly created operator family not listed by pg_event_trigger_ddl_commands
  In-Reply-To: <YoYGKWWwrB+8AlV/@paquier.xyz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox