Re: Collect ObjectAddress for ATTACH DETACH PARTITION to use in event trigger - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Collect ObjectAddress for ATTACH DETACH PARTITION to use in event trigger
Date
Msg-id Ytjw6fYFo4/WMMnp@paquier.xyz
Whole thread Raw
In response to Re: Collect ObjectAddress for ATTACH DETACH PARTITION to use in event trigger  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: Collect ObjectAddress for ATTACH DETACH PARTITION to use in event trigger
List pgsql-hackers
On Wed, Jul 20, 2022 at 04:36:13PM +0530, Amit Kapila wrote:
> Right. But, I noticed that get_altertable_subcmdtypes() doesn't handle
> AT_AttachPartition or AT_DetachPartition. We can handle those and at
> least have a test for those in test_ddl_deparse\sql\slter_table.sql. I
> know it is not directly related to your patch but that way we will at
> least have some tests for Attach/Detach partition and in the future
> when we extend it to test ObjectAddresses of subcommands that would be
> handy. Feel free to write a separate patch for the same.

Yeah, that could be a separate patch.  On top of that, what about
reworking get_altertable_subcmdtypes() so as it returns one row for
each CollectedCommand, as of (type text, address text)?  We have
already getObjectDescription() to transform the ObjectAddress from the
collected command to a proper string.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Schema variables - new implementation for Postgres 15
Next
From: Alvaro Herrera
Date:
Subject: Re: Memory leak fix in psql