Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bILhm-0005DM-VT for pgsql-bugs@arkaria.postgresql.org; Wed, 29 Jun 2016 20:03:27 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bILhm-0001Da-I4 for pgsql-bugs@arkaria.postgresql.org; Wed, 29 Jun 2016 20:03:26 +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_2) (envelope-from ) id 1bILhl-0001DH-VR for pgsql-bugs@postgresql.org; Wed, 29 Jun 2016 20:03:26 +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_2) (envelope-from ) id 1bILhj-0006aK-Q6 for pgsql-bugs@postgresql.org; Wed, 29 Jun 2016 20:03:24 +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 u5TK3Mwi029321; Wed, 29 Jun 2016 16:03:22 -0400 From: Tom Lane To: andrew@tao11.riddles.org.uk cc: pgsql-bugs@postgresql.org, david.clymer@vistashare.com Subject: Re: BUG #14219: rules vs. FK optimization: ERROR: no relation entry for relid 2 In-reply-to: <20160629183338.1397.43514@wrigleys.postgresql.org> References: <20160629183338.1397.43514@wrigleys.postgresql.org> Comments: In-reply-to andrew@tao11.riddles.org.uk message dated "Wed, 29 Jun 2016 18:33:38 -0000" Date: Wed, 29 Jun 2016 16:03:22 -0400 Message-ID: <29320.1467230602@sss.pgh.pa.us> X-Pg-Spam-Score: -3.2 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org andrew@tao11.riddles.org.uk writes: > create table t1 (a integer primary key, b text); > create table t2 (a integer primary key, b integer references t1); > create rule r1 as on delete to t1 do delete from t2 where t2.b=old.a; > delete from t1 where a=1; > ERROR: no relation entry for relid 2 Fixed, thanks for report! regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs