From: andrew@tao11.riddles.org.uk
To: pgsql-bugs@postgresql.org
Subject: BUG #14219: rules vs. FK optimization: ERROR: no relation entry for relid 2
Date: Wed, 29 Jun 2016 18:33:38 +0000
Message-ID: <20160629183338.1397.43514@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
The following bug has been logged on the website:
Bug reference: 14219
Logged by: Andrew Gierth
Email address: andrew@tao11.riddles.org.uk
PostgreSQL version: 9.6beta2
Operating system: any
Description:
(My analysis of a bug originally reported on IRC; please CC david.clymer at
vistashare.com)
I constructed this test case based on the original report:
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
The error is coming from match_foreign_keys_to_quals, but I haven't yet
investigated further.
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: andrew@tao11.riddles.org.uk
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>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox