Re: [PATCH] refactor ATExec{En,Dis}ableRowSecurity

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Zhihong Yu <zyu@yugabyte.com>
Cc: Justin Pryzby <pryzby@telsasoft.com>, Stephen Frost <sfrost@snowman.net>, PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2021-03-01T06:30:44Z
Lists: pgsql-hackers
On Sun, Feb 28, 2021 at 02:27:44PM -0800, Zhihong Yu wrote:
> For 0002-Further-refactoring.patch, should there be assertion
> inside ATExecSetRowSecurity() on the values for rls and force_rls ?
> There could be 3 possible values: -1, 0 and 1.

0001 is a clean simplification and a good catch, so I'll see about
applying it.  0002 just makes the code more confusing to the reader
IMO, and its interface could easily lead to unwanted errors.
--
Michael

Commits

  1. Simplify code to switch pg_class.relrowsecurity in tablecmds.c