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

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Collect ObjectAddress for ATTACH DETACH PARTITION to use in event trigger
Дата
Msg-id YuTaWS+cjknNw6EN@paquier.xyz
обсуждение исходный текст
Ответ на RE: Collect ObjectAddress for ATTACH DETACH PARTITION to use in event trigger  ("houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>)
Ответы RE: Collect ObjectAddress for ATTACH DETACH PARTITION to use in event trigger  ("houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>)
Список pgsql-hackers
On Tue, Jul 26, 2022 at 01:00:41PM +0000, houzj.fnst@fujitsu.com wrote:
> Thanks for the suggestion. I have removed the default and found some missed
> subcommands in 0003 patch. Attach the new version patch here
> (The 0001 and 0002 is unchanged).

I have reviewed what you have here, and I found that the change is too
timid, with a coverage of 32% for test_ddl_deparse.  Attached is an
updated patch, that provides coverage for the most obvious cases I
could see in tablecmds.c, bringing the coverage to 64% here.

Some cases are straight-forward, like the four cases for RLS or the
three subcases for RelOptions (where we'd better return an address
even if doing doing for the replace case).  Some cases that I have not
included here would need more thoughts, like constraint validation and
drop or even SET ACCESS METHOD, so I have discarded for now all the
cases where we don't (or cannot) report properly an ObjectAddress
yet.

There is also a fancy case with DROP COLUMN, where we get an
ObjectAddress referring to the column already dropped, aka roughly a
".....pg_dropped.N.....", and it is not like we should switch to only
a reference of the table here because we want to know the name of the
column dropped.  I have discarded this last one as well, for now.

All that could be expanded in more patches (triggers are an easy one),
but what I have here is already a good cut.
--
Michael

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Introduce wait_for_subscription_sync for TAP tests
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Support for grabbing multiple consecutive values with nextval()