Add OAT hook calls for more subcommands of ALTER TABLE
Michael Paquier <michael@paquier.xyz>
Add OAT hook calls for more subcommands of ALTER TABLE
The OAT hooks are added in ALTER TABLE for the following subcommands:
- { ENABLE | DISABLE | [NO] FORCE } ROW LEVEL SECURITY
- { ENABLE | DISABLE } TRIGGER
- { ENABLE | DISABLE } RULE. Note that there was hook for pg_rewrite,
but not for relation ALTER'ed in pg_class.
Tests are added to test_oat_hook for all the subcommand patterns gaining
hooks here. Based on an ask from Legs Mansion.
Discussion: https://postgr.es/m/tencent_083B3850655AC6EE04FA0A400766D3FE8309@qq.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/tablecmds.c | modified | +12 −0 |
| src/test/modules/test_oat_hooks/expected/alter_table.out | added | +163 −0 |
| src/test/modules/test_oat_hooks/Makefile | modified | +1 −1 |
| src/test/modules/test_oat_hooks/meson.build | modified | +1 −0 |
| src/test/modules/test_oat_hooks/sql/alter_table.sql | added | +48 −0 |
Discussion
- A Question about InvokeObjectPostAlterHook 3 messages · 2023-04-18 → 2023-08-15