pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #14219: rules vs. FK optimization: ERROR: no relation entry for relid 2
2+ messages / 2 participants
[nested] [flat]

* BUG #14219: rules vs. FK optimization: ERROR: no relation entry for relid 2
@ 2016-06-29 18:33 andrew@tao11.riddles.org.uk
  2016-06-29 20:03 ` Re: BUG #14219: rules vs. FK optimization: ERROR: no relation entry for relid 2 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: andrew@tao11.riddles.org.uk @ 2016-06-29 18:33 UTC (permalink / raw)
  To: pgsql-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


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #14219: rules vs. FK optimization: ERROR: no relation entry for relid 2
  2016-06-29 18:33 BUG #14219: rules vs. FK optimization: ERROR: no relation entry for relid 2 andrew@tao11.riddles.org.uk
@ 2016-06-29 20:03 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2016-06-29 20:03 UTC (permalink / raw)
  To: andrew@tao11.riddles.org.uk; +Cc: pgsql-bugs; david.clymer@vistashare.com

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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2016-06-29 20:03 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-06-29 18:33 BUG #14219: rules vs. FK optimization: ERROR: no relation entry for relid 2 andrew@tao11.riddles.org.uk
2016-06-29 20:03 ` Tom Lane <tgl@sss.pgh.pa.us>

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