Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZgeK2-0003bT-Cv for pgsql-hackers@arkaria.postgresql.org; Mon, 28 Sep 2015 19:42:50 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZgeK1-0007Es-RK for pgsql-hackers@arkaria.postgresql.org; Mon, 28 Sep 2015 19:42:49 +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 1ZgeK0-0007Dy-5A for pgsql-hackers@postgresql.org; Mon, 28 Sep 2015 19:42:48 +0000 Received: from tamriel.snowman.net ([2001:4830:167b::11]) by makus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZgeJt-0003Jq-9b for pgsql-hackers@postgresql.org; Mon, 28 Sep 2015 19:42:46 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 6B9155F796; Mon, 28 Sep 2015 15:42:40 -0400 (EDT) Date: Mon, 28 Sep 2015 15:42:40 -0400 From: Stephen Frost To: Dean Rasheed Cc: Tom Lane , Alvaro Herrera , PostgreSQL Hackers Subject: Re: Rename withCheckOptions to insertedCheckClauses Message-ID: <20150928194240.GV3685@tamriel.snowman.net> References: <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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="k2rJgCxy9hzS0cCq" Content-Disposition: inline In-Reply-To: X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/3.13.0-61-generic (x86_64) X-Uptime: 15:32:25 up 55 days, 4:02, 5 users, load average: 0.05, 0.15, 0.14 User-Agent: Mutt/1.5.21 (2010-09-15) 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 --k2rJgCxy9hzS0cCq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Dean Rasheed (dean.a.rasheed@gmail.com) wrote: > None of this renaming seems like an improvement to me. I have to admit that I'm not entirely sure it's improving things either. Certainly, we shouldn't be dumping out the withCheckOptions node and perhaps we should move its place in Query and add comments to it, but I'm not sure about the other changes. > ri_InsertedCheckClauses is misleading because they're not clauses, > they're WithCheckOption nodes carrying various pieces of information, > only one of which is the clause to check. >=20 > ri_InsertedCheckOptions is a bit better from that perspective, but it > still seems messy for the executor to carry the knowledge that these > checks were inserted by the rewriter. In the executor they're just > checks to be executed, and "WithCheck" reflects their original source > better than "InsertedCheck". Yeah, the actual structure is 'WithCheckOption' and everything is pretty consistent around that. One possibly confusing bit is that we have a ViewCheckOption enum in ViewStmt called "withCheckOption". Perhaps that's what we should change? Semes like it's either that or rename the structure itself to NewTupleCheck (or similar) and rename everything to go along with that instead. > Also, these were added in 9.4, so introducing this many differences > between 9.4 and 9.5+ will make back-patching harder. That's certainly true, but we don't want current or future hackers to be confused either. > The original objection to the name WithCheckOptions was in relation to > the Query struct, and the fact that this field isn't the parsed > representation of WITH CHECK OPTION's on the query. I think that can > be cured with a suitable comment. There's also the issue that outfuncs is including that node when it really shouldn't be. That can be fixed independnetly of this discussion, of course. Thanks! Stephen --k2rJgCxy9hzS0cCq Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJWCZgvAAoJEO1sijiDR2RVO9cQAIy8AMFbR/C1aSmq0M4sJJA2 /caHlPdY/75gzvNon0q860Bl2lFO4hxbIPFMZNHl0FryyyYskJW3QtsYu41dulGN WE31Ko/gXRXvJCYqALkPaBe+Zg7VialgZDWnlV9lA5eefhpPripw1DiFJGgRU9Kf ttU/32qJmlh2wbwqEcab35J0IU2k/wAMyrYU1k9iCCXZbDnsvhkNbtDzZgVkL+Xt nDIdu09TMIBboZO9YAFS14zJ8pViWkdH0rfyrKPCp7wtX9JjC/SMsSpILAofmHTJ QOrcYDZheh+PjkETEQcRuBppeVAZBVl+ururPZHlHBFMyRPk2OxiZsjlIL4bphwD 7Xsf9ijIYZlqCpLg8YJHiEGB+u03ezZ9ArjlhLwDFmQawiHfcjc3nYcl9BAvMqrJ 1uxYxEuYKhdoNs6dyRNGpkyfn/Pcg28iEa6jNESseLvOXd9JRga5OMnbcVM/Q8JN 9NMLw17VKwjpbGfCD5/CMK7RsYavlFB/qCZaysDq0Lwc7jgk35umwT5G4AL6kyNc HVaQ21PZBIOUzezYR3c5wVnyOHPr6jZcfsJFGORVhw4mIDtKIphouKohVBAb5Gku b10naWUXLXtemNeMjflqUaXBZh27uE8WLIr1zyGdIta/ozhEg1cYM/wXZD6hCEE8 IHwDb3x0Htmu0FOMPjW4 =t0yO -----END PGP SIGNATURE----- --k2rJgCxy9hzS0cCq--