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 Yt5vxDGMruA4Dvug@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 Mon, Jul 25, 2022 at 09:25:07AM +0000, houzj.fnst@fujitsu.com wrote:
> BTW, while reviewing it, I found there are some more subcommands that the
> get_altertable_subcmdtypes() doesn't handle(e.g., ADD/DROP/SET IDENTITY and re ADD
> STAT). Shall we fix them all while on it ?
>
> Attach a minor patch to fix those which is based on the v2 patch set.

@@ -300,6 +300,18 @@ get_altertable_subcmdinfo(PG_FUNCTION_ARGS)
[ ... ]
    default:
        strtype = "unrecognized";
        break;

Removing the "default" clause would help here as we would get compiler
warnings if there is anything missing.  One way to do things is to set
strtype to NULL before going through the switch and have a failsafe as
some commands are internal so they may not be worth adding to the
output.
--
Michael

Вложения

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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: SLRUs in the main buffer pool, redux
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: make -C libpq check fails obscurely if tap tests are disabled