Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1okQwV-0008Fi-Q6 for pgsql-bugs@arkaria.postgresql.org; Mon, 17 Oct 2022 14:18:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1okQwU-0006Yu-FC for pgsql-bugs@arkaria.postgresql.org; Mon, 17 Oct 2022 14:18:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1okQwU-0006Yk-77 for pgsql-bugs@lists.postgresql.org; Mon, 17 Oct 2022 14:18:10 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1okQwR-0001Fx-LN for pgsql-bugs@lists.postgresql.org; Mon, 17 Oct 2022 14:18:09 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 29HEHtew2164337; Mon, 17 Oct 2022 10:17:56 -0400 From: Tom Lane To: liukui@kingbase.com.cn cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17646: create rule named "_RETURN" will cause pg core In-reply-to: <17646-70c93cfa40365776@postgresql.org> References: <17646-70c93cfa40365776@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Mon, 17 Oct 2022 12:03:15 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2164335.1666016275.1@sss.pgh.pa.us> Date: Mon, 17 Oct 2022 10:17:55 -0400 Message-ID: <2164336.1666016275@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > here is a test case > create table t (id integer); > create view v1 as select * from t; > create or replace rule "_RETURN" as on UPDATE to v1 do instead select * from > t; Meh. We should be preventing you from doing that. (Although the core dump is also not great --- something should've noticed the bogosity of the plan earlier than this.) regards, tom lane