Simplify code to switch pg_class.relrowsecurity in tablecmds.c
authorMichael Paquier <michael@paquier.xyz>
Tue, 2 Mar 2021 03:30:21 +0000 (12:30 +0900)
committerMichael Paquier <michael@paquier.xyz>
Tue, 2 Mar 2021 03:30:21 +0000 (12:30 +0900)
commitfabde52fab976ff782d77c80b8e2614f94f9dce1
treea37457192f1a577705bf22d59eca8a8256b07cde
parentbd1b8d0ef2eb5f2a8765fbb3b74e0262c9983942
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
src/backend/commands/tablecmds.c