Simplify code to switch pg_class.relrowsecurity in tablecmds.c

Michael Paquier <michael@paquier.xyz>

Commit: fabde52fab976ff782d77c80b8e2614f94f9dce1
Author: Michael Paquier <michael@paquier.xyz>
Date: 2021-03-02T03:30:21Z
Releases: 14.0
Simplify code to switch pg_class.relrowsecurity in tablecmds.c

The same code pattern was repeated twice to enable or disable ROW LEVEL
SECURITY with an ALTER TABLE command.  This makes the code slightly
cleaner.

Author: Justin Pryzby
Reviewed-by: Zhihong Yu
Discussion: https://postgr.es/m/20210228211854.GC20769@telsasoft.com

Files

PathChange+/−
src/backend/commands/tablecmds.c modified +5 −29

Discussion