pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: jiye_sw@126.com
Subject: BUG #17633: Define rule on views which do insert to another relation trigger cache lookup failed error.
Date: Tue, 11 Oct 2022 09:27:38 +0000
Message-ID: <17633-98cc85e1fa91e905@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      17633
Logged by:          leafji&#x27;s git home
Email address:      jiye_sw@126.com
PostgreSQL version: 14.5
Operating system:   Centos
Description:        

Just execute as follow sql:

drop view v1;
drop table t1;
drop table t2;
create table t1(i int, j int);
create table t2(a int, b int, c int, d int);
create or replace rule t1_r as on insert to t1 do also insert into t2(c,d)
values (new.i, new.j);
insert into t1 values (1,default);
insert into t1 values (1,default),(2, default);
-- create rule on t1 directly no issue
drop rule t1_r on t1;
create view v1 as select * from t1;
— create rule on view query t1 will trigger this issue
create or replace rule v1_r as on insert to v1 do also insert into t2(c,d)
values (new.i, new.j);
insert into v1 values (1,default);
-- must multi values.
insert into v1 values (1,default),(2, default);
=> it will trigger cache lookup failed for type.



view thread (9+ messages)  latest in thread

Message-ID: <17633-98cc85e1fa91e905@postgresql.org>
Permalink:  ../17633-98cc85e1fa91e905@postgresql.org/
Also on:    postgresql.org/message-id/17633-98cc85e1fa91e905@postgresql.org

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, jiye_sw@126.com
  Subject: Re: BUG #17633: Define rule on views which do insert to another relation trigger cache lookup failed error.
  In-Reply-To: <17633-98cc85e1fa91e905@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