Re: Rename withCheckOptions to insertedCheckClauses - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Rename withCheckOptions to insertedCheckClauses
Date
Msg-id 24625.1443125280@sss.pgh.pa.us
Whole thread Raw
In response to Rename withCheckOptions to insertedCheckClauses  (Stephen Frost <sfrost@snowman.net>)
Responses Re: Rename withCheckOptions to insertedCheckClauses  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: Stephen Frost
Date:
Subject: Re: No Issue Tracker - Say it Ain't So!
Next
From: Noah Misch
Date:
Subject: Re: PGXS "check" target forcing an install ?