[PATCH] refactor ATExec{En,Dis}ableRowSecurity

Started by Justin Pryzbyabout 5 years ago4 messageshackers
Jump to latest
#1Justin Pryzby
pryzby@telsasoft.com

tablecmds.c is 17k lines long, this makes it ~30 lines shorter.

Attachments:

0001-Refactor-ATExec-En-Dis-ableRowSecurity-in-the-style-.patchtext/x-diff; charset=us-asciiDownload+5-30
0002-Further-refactoring.patchtext/x-diff; charset=us-asciiDownload+13-34
#2Zhihong Yu
zyu@yugabyte.com
In reply to: Justin Pryzby (#1)
Re: [PATCH] refactor ATExec{En,Dis}ableRowSecurity

Hi,
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.

Cheers

On Sun, Feb 28, 2021 at 1:19 PM Justin Pryzby <pryzby@telsasoft.com> wrote:

Show quoted text

tablecmds.c is 17k lines long, this makes it ~30 lines shorter.

#3Michael Paquier
michael@paquier.xyz
In reply to: Zhihong Yu (#2)
Re: [PATCH] refactor ATExec{En,Dis}ableRowSecurity

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

#4Michael Paquier
michael@paquier.xyz
In reply to: Michael Paquier (#3)
Re: [PATCH] refactor ATExec{En,Dis}ableRowSecurity

On Mon, Mar 01, 2021 at 03:30:44PM +0900, Michael Paquier wrote:

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.

0001 has been applied as of fabde52.
--
Michael