Re: [PATCH] Add reloption for views to enable RLS - Mailing list pgsql-hackers

From Dean Rasheed
Subject Re: [PATCH] Add reloption for views to enable RLS
Date
Msg-id CAEZATCUnh22WG9KFm7_WQ=T5u6zcYfSXMsyprL3Brse5hPpU_g@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Add reloption for views to enable RLS  (Christoph Heiss <christoph.heiss@cybertec.at>)
Responses Re: [PATCH] Add reloption for views to enable RLS  (Wolfgang Walther <walther@technowledgy.de>)
Re: [PATCH] Add reloption for views to enable RLS  (Laurenz Albe <laurenz.albe@cybertec.at>)
Re: [PATCH] Add reloption for views to enable RLS  (Christoph Heiss <christoph.heiss@cybertec.at>)
List pgsql-hackers
On Tue, 1 Mar 2022 at 16:40, Christoph Heiss
<christoph.heiss@cybertec.at> wrote:
>
> That is also the main reason I preferred naming it "security_invoker" -
> it is consistent with other databases and eases transition from such
> systems.
>
> I kept "check_permissions_owner" for now. Constantly changing it around
> with each iteration doesn't really bring any value IMHO, I'd rather have
> a final consensus on how to name the option and *then* change it for good.
>

Yes indeed, it's annoying to keep changing the name between patch
versions, so let's try to get a consensus now.

For my part, I find myself more and more convinced that
"security_invoker" is the right name, because it matches the
terminology used for functions, and in other database systems. I think
the parallels between security invoker functions and security invoker
views are quite strong.

There are a couple of additional considerations that lend weight to
that choice of name, though not uniquely to it:

1). There is a slight advantage to having an option that defaults to
false/off, like the existing "security_barrier" option -- it allows a
shorthand to turn the option on, because the system automatically
turns "WITH (security_barrier)" into "WITH (security_barrier=true)".

2). Grammatically, a name like this works better, because it serves
both as the name of the boolean option, and as an adjective that can
be used to describe and name the feature -- as in "security barrier
views are cool" -- making it easier to talk about the feature.

"check_permissions_owner=false" doesn't work as well in either regard,
and just feels much more clumsy.

When we come to write the release notes for this feature, saying that
this version of PG now supports security invoker views is going to
mean a lot more to people who already use that feature in other
databases.

What are other people's opinions?

Regards,
Dean



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: pg_stop_backup() v2 incorrectly marked as proretset
Next
From: "Daniel Westermann (DWE)"
Date:
Subject: Changing "Hot Standby" to "hot standby"