Add OAT hook calls for more subcommands of ALTER TABLE
commit352ea3acf8a2d6e0490eb005bce38303de4564dd
authorMichael Paquier <michael@paquier.xyz>
Wed, 16 Aug 2023 23:54:17 +0000 (17 08:54 +0900)
committerMichael Paquier <michael@paquier.xyz>
Wed, 16 Aug 2023 23:54:17 +0000 (17 08:54 +0900)
tree425769c7d3caa157844fc1700e71adc15e60c031
parentdca20013ebab0f0176e610a36b846d899af1d451
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
src/backend/commands/tablecmds.c
src/test/modules/test_oat_hooks/Makefile
src/test/modules/test_oat_hooks/expected/alter_table.out [new file with mode: 0644]
src/test/modules/test_oat_hooks/meson.build
src/test/modules/test_oat_hooks/sql/alter_table.sql [new file with mode: 0644]