Re: Collect ObjectAddress for ATTACH DETACH PARTITION to use in event trigger

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com>, "kuroda(dot)hayato(at)fujitsu(dot)com" <kuroda(dot)hayato(at)fujitsu(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Collect ObjectAddress for ATTACH DETACH PARTITION to use in event trigger
Date: 2022-07-23 10:58:01
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Sat, Jul 23, 2022 at 05:44:28PM +0900, Michael Paquier wrote:
> Changing get_altertable_subcmdtypes() to return a set of rows made of
> (subcommand, object description) is what I actually meant upthread as
> it feels natural given a CollectedCommand in input, and as
> pg_event_trigger_ddl_commands() only gives access to a set of
> CollectedCommands. This is also a test module so
> there is no issue in changing the existing function definitions.
> But your point would be to have a new function that takes in input a
> CollectedATSubcmd, returning back the object address or its
> description? How would you make sure that a subcommand maps to a
> correct object address?

FWIW, I was thinking about something among the lines of 0002 on top of
Hou's patch.

Attachment Content-Type Size
v2-0001-Collect-ObjectAddress-for-ATTACH-DETACH-PARTITION.patch text/x-diff 2.0 KB
v2-0002-Extend-test_ddl_deparse-for-ALTER-TABLE-.-ATTACH-.patch text/x-diff 10.7 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Aleksander Alekseev 2022-07-23 10:58:31 Re: Refactoring the regression tests for more independence
Previous Message Bharath Rupireddy 2022-07-23 09:58:19 Re: Use "WAL segment" instead of "log segment" consistently in user-facing messages