Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZfD6B-0000Rh-Us for pgsql-hackers@arkaria.postgresql.org; Thu, 24 Sep 2015 20:26:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZfD6B-0001EX-GT for pgsql-hackers@arkaria.postgresql.org; Thu, 24 Sep 2015 20:26:35 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZfD4o-0006Oi-S9 for pgsql-hackers@postgresql.org; Thu, 24 Sep 2015 20:25:11 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZfD4m-00055h-Cx for pgsql-hackers@postgresql.org; Thu, 24 Sep 2015 20:25:09 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t8OKP3VC025062; Thu, 24 Sep 2015 16:25:03 -0400 From: Tom Lane To: Stephen Frost cc: Alvaro Herrera , pgsql-hackers@postgresql.org Subject: Re: Rename withCheckOptions to insertedCheckClauses In-reply-to: <24625.1443125280@sss.pgh.pa.us> References: <22678.1442348981@sss.pgh.pa.us> <20150915220002.GB3685@tamriel.snowman.net> <20150915221655.GK88970@alvherre.pgsql> <27213.1442356184@sss.pgh.pa.us> <20150915224851.GD3685@tamriel.snowman.net> <28196.1442358966@sss.pgh.pa.us> <20150924194358.GE3685@tamriel.snowman.net> <20150924194529.GF3685@tamriel.snowman.net> <24625.1443125280@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Thu, 24 Sep 2015 16:08:00 -0400" Date: Thu, 24 Sep 2015 16:25:03 -0400 Message-ID: <25061.1443126303@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org I wrote: > - 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. Actually ... does struct ResultRelInfo need to carry the original WCO clauses at all, rather than just the exprstate list? In most places we do not store expr and exprstate lists in the same node in the first place, so we can get away with using the same field name for corresponding lists in plan and planstate nodes. That's why we don't already have a convention like "fooStates" for such lists. Another thought is that as long as these are lists specifically of WithCheckOption nodes, and not arbitrary expressions, "clause" isn't an especially good term for them; it implies generality that isn't there. And CheckClauses invites confusion with, for example, CHECK clauses of domain types. So maybe better names would be "ri_InsertedCheckOptions" (and "ri_InsertedCheckOptionStates" if you still need that). Or maybe "ri_InsertedWCOClauses" and "ri_InsertedWCOClauseStates". I'm less sure about whether this is an improvement, though. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers