Re: BUG #14219: rules vs. FK optimization: ERROR: no relation entry for relid 2

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: andrew(at)tao11(dot)riddles(dot)org(dot)uk
Cc: pgsql-bugs(at)postgresql(dot)org, david(dot)clymer(at)vistashare(dot)com
Subject: Re: BUG #14219: rules vs. FK optimization: ERROR: no relation entry for relid 2
Date: 2016-06-29 20:03:22
Message-ID: 29320.1467230602@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

andrew(at)tao11(dot)riddles(dot)org(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message christopher.m.hanks 2016-06-29 22:43:49 BUG #14220: pg_get_expr() with an incorrect relation id crashes the server
Previous Message andrew 2016-06-29 18:33:38 BUG #14219: rules vs. FK optimization: ERROR: no relation entry for relid 2