Re: pgsql: RLS refactoring

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

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;
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.

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Stephen Frost 2015-09-15 22:48:52 Re: pgsql: RLS refactoring
Previous Message Stephen Frost 2015-09-15 22:27:02 Re: pgsql: RLS refactoring

Browse pgsql-hackers by date

  From Date Subject
Next Message Rod Taylor 2015-09-15 22:38:02 Re: [PROPOSAL] Covering + unique indexes.
Previous Message Stephen Frost 2015-09-15 22:27:02 Re: pgsql: RLS refactoring