Re: Rename withCheckOptions to insertedCheckClauses

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Rename withCheckOptions to insertedCheckClauses
Дата
Msg-id 24625.1443125280@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Rename withCheckOptions to insertedCheckClauses  (Stephen Frost <sfrost@snowman.net>)
Ответы Re: Rename withCheckOptions to insertedCheckClauses  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Stephen Frost <sfrost@snowman.net> writes:
> Alright, attached is an attempt at doing these renames.  I went a bit
> farther since it seemed to make sense to me (at least at the time, I'm
> wondering a bit about it now), so, please provide any thoughts or
> feedback you have regarding these changes.

> Further, rename 'withCheckOptions' in Query and ModifyTable to
> 'insertedCheckClauses', ExecWithCheckOption to ExecCheckClauses,
> ri_WithCheckOptions and ri_WithCheckOptionExprs to
> ri_InsertedCheckClauses and ri_InsertedCheckExprs, respectively, all to
> make it clear that these are the check clauses which were added by the
> rewriter, not the actual WITH CHECK OPTION indication for a view (which
> is stored in reloptions for the view) nor the WITH CHECK expressions for

That commitlog entry doesn't seem to quite square with the patch,
wherein I see

- *        WithCheckOptions        list of WithCheckOption's to be checked
- *        WithCheckOptionExprs    list of WithCheckOption expr states
+ *        InsertedCheckClauses    list of WithCheckOption's to be checked
+ *        InsertedCheckClauseExprs    list of WithCheckOption expr states

-    List       *ri_WithCheckOptions;
-    List       *ri_WithCheckOptionExprs;
+    List       *ri_InsertedCheckClauses;
+    List       *ri_InsertedCheckClauseExprs;

The distinction between a "clause" and an "expr" is not very obvious,
and certainly most other places in the code use those terms pretty
interchangeably, so I find both the old and new names unclear here.
How about ri_InsertedCheckClauseStates instead for the second list?
And similarly if you're using "Expr" to mean ExprState anywhere else.
        regards, tom lane



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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: No Issue Tracker - Say it Ain't So!
Следующее
От: Noah Misch
Дата:
Сообщение: Re: PGXS "check" target forcing an install ?