Skip to content

Latest commit

 

History

History
58 lines (30 loc) · 3.34 KB

20230817_01.md

File metadata and controls

58 lines (30 loc) · 3.34 KB

PostgreSQL 17 preview - 增加alter table部分属性hook, 未来可定制化审计功能

作者

digoal

日期

2023-08-17

标签

PostgreSQL , PolarDB , hook , alter table , 审计


背景

增加alter table部分属性hook. 未来可期, 例如可以定制化审计功能.

https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=352ea3acf8a2d6e0490eb005bce38303de4564dd

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  

digoal's wechat