Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZbyjZ-00037g-88 for pgsql-committers@arkaria.postgresql.org; Tue, 15 Sep 2015 22:29:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZbyjY-0004ql-Ps for pgsql-committers@arkaria.postgresql.org; Tue, 15 Sep 2015 22:29:52 +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 1ZbyjY-0004qX-6C for pgsql-committers@postgresql.org; Tue, 15 Sep 2015 22:29:52 +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 1ZbyjV-00060F-Iz for pgsql-committers@postgresql.org; Tue, 15 Sep 2015 22:29:50 +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 t8FMTiS0027214; Tue, 15 Sep 2015 18:29:44 -0400 From: Tom Lane To: Alvaro Herrera cc: Stephen Frost , pgsql-committers@postgresql.org Subject: Re: pgsql: RLS refactoring In-reply-to: <20150915221655.GK88970@alvherre.pgsql> References: <22678.1442348981@sss.pgh.pa.us> <20150915220002.GB3685@tamriel.snowman.net> <20150915221655.GK88970@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Tue, 15 Sep 2015 19:16:55 -0300" Date: Tue, 15 Sep 2015 18:29:44 -0400 Message-ID: <27213.1442356184@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-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org Alvaro Herrera writes: > Stephen Frost wrote: >> The WithCheckOption node which was changed doesn't ever end up in the >> catalog, I don't believe; certainly not in pg_policy which just stores >> the expressions which come from transformWhereClause, which haven't >> changed. > Uhm, so why is it in readfuncs.c? If you create a view "WITH CHECK > OPTION", the pg_rewrite row says ":withCheckOptions <>". Does that not > change with your commit? That field would always be NIL in a query produced by the parser; it's only ever filled by the rewriter. But if this is documented anywhere, I couldn't find it, and the placement of the field in struct Query seems designed to be as confusing as possible about that. I'd have put it down near the end myself, and certainly have documented that it is NOT the parse-time representation of a WITH CHECK OPTION clause. For that matter I don't even find it to be named very well, because it's impossible to avoid that impression with the name as-is. Perhaps something like insertedCheckClauses would have been better. regards, tom lane -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers