Re: pgsql: RLS refactoring

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pgsql: RLS refactoring
Дата
Msg-id 27213.1442356184@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pgsql: RLS refactoring  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: pgsql: RLS refactoring  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-committers
Alvaro Herrera <alvherre@2ndquadrant.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


В списке pgsql-committers по дате отправления:

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: pgsql: RLS refactoring
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: pgsql: RLS refactoring