pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Stephen Frost <sfrost@snowman.net>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Rename withCheckOptions to insertedCheckClauses
Date: Thu, 24 Sep 2015 16:25:03 -0400
Message-ID: <25061.1443126303@sss.pgh.pa.us> (raw)
In-Reply-To: <24625.1443125280@sss.pgh.pa.us>
References: <E1ZbwEg-0004Ct-Qc@gemulon.postgresql.org>
	<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>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

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



view thread (7+ messages)  latest in thread

Message-ID: <25061.1443126303@sss.pgh.pa.us>
Permalink:  ../25061.1443126303@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/25061.1443126303@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, sfrost@snowman.net, alvherre@2ndquadrant.com, pgsql-hackers@postgresql.org
  Subject: Re: Rename withCheckOptions to insertedCheckClauses
  In-Reply-To: <25061.1443126303@sss.pgh.pa.us>
  References: <E1ZbwEg-0004Ct-Qc@gemulon.postgresql.org> <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> <25061.1443126303@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox