Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ieiIp-00077j-At for pgsql-hackers@arkaria.postgresql.org; Tue, 10 Dec 2019 16:23:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ieiIn-0000ZE-Qk for pgsql-hackers@arkaria.postgresql.org; Tue, 10 Dec 2019 16:23:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ieiIn-0000Z7-HS for pgsql-hackers@lists.postgresql.org; Tue, 10 Dec 2019 16:23:57 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ieiIl-0000Db-Ax for pgsql-hackers@postgresql.org; Tue, 10 Dec 2019 16:23:57 +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 xBAGNqoK008541; Tue, 10 Dec 2019 11:23:52 -0500 From: Tom Lane To: Peter Eisentraut cc: pgsql-hackers Subject: Re: about allow_system_table_mods and SET STATISTICS In-reply-to: References: <6375.1575501374@sss.pgh.pa.us> Comments: In-reply-to Peter Eisentraut message dated "Tue, 10 Dec 2019 13:41:28 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <8539.1575995032.1@sss.pgh.pa.us> Date: Tue, 10 Dec 2019 11:23:52 -0500 Message-ID: <8540.1575995032@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Peter Eisentraut writes: > Good point. Done in the attached patch. > (If someone wanted to revive the original functionality, it would > nowadays probably be easier to add a flag ATT_SYSTEM_TABLE to > ATSimplePermissions(), so there is really no reason to keep the old > function separate.) Yeah --- that way, the behavior would also be conveniently available to other ALTER TABLE subcommands. This patch looks good, with one trivial nitpick: it looks a bit odd to insert the relkind check into ATExecSetStatistics between the assignment of "newtarget" and the validity check for same. I'd put it either before or after that whole stanza. Just a cosmetic thing though. regards, tom lane