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 08:44:28 |
Message-ID: | Ytu07PkJtMfr9jZN@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Jul 22, 2022 at 02:26:02PM +0530, Amit Kapila wrote:
> Yeah, that would be a good idea but I think instead of changing
> get_altertable_subcmdtypes(), can we have a new function say
> get_altertable_subcmdinfo() that returns additional information from
> address. The other alternative could be that instead of returning the
> address as a string, we can return some fields as a set of records
> (one row for each subcommand) as we do in
> pg_event_trigger_ddl_commands().
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?
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Munro | 2022-07-23 08:47:48 | Re: MultiXact\SLRU buffers configuration |
Previous Message | Andrey Borodin | 2022-07-23 08:39:50 | Re: MultiXact\SLRU buffers configuration |