Re: pgsql: RLS refactoring

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: RLS refactoring
Date: 2015-09-15 22:48:52
Message-ID: 20150915224851.GD3685@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

* Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)us) wrote:
> Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
> > Stephen Frost wrote:
> >> The WithCheckOption node which was changed doesn't ever end up in the
> >> catalog, I don't believe; certainly not in pg_policy which just stores
> >> the expressions which come from transformWhereClause, which haven't
> >> changed.
>
> > Uhm, so why is it in readfuncs.c? If you create a view "WITH CHECK
> > OPTION", the pg_rewrite row says ":withCheckOptions <>". Does that not
> > change with your commit?
>
> That field would always be NIL in a query produced by the parser;

Right.

> it's only ever filled by the rewriter. But if this is documented
> anywhere, I couldn't find it, and the placement of the field in struct
> Query seems designed to be as confusing as possible about that. I'd have
> put it down near the end myself, and certainly have documented that it is
> NOT the parse-time representation of a WITH CHECK OPTION clause. For that
> matter I don't even find it to be named very well, because it's impossible
> to avoid that impression with the name as-is. Perhaps something like
> insertedCheckClauses would have been better.

Agreed. I will see about improving on that situation with at least
documentation changes. If we want to remove it completely then we'd
need to bump catversion.. Not against doing that if we want to though.
Might be better that way.

Thanks!

Stephen

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2015-09-15 23:16:06 Re: pgsql: RLS refactoring
Previous Message Tom Lane 2015-09-15 22:29:44 Re: pgsql: RLS refactoring

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2015-09-15 22:50:39 Re: [PROPOSAL] Covering + unique indexes.
Previous Message Rod Taylor 2015-09-15 22:38:02 Re: [PROPOSAL] Covering + unique indexes.