sraoss / pgsql-ivm

IVM (Incremental View Maintenance) development for PostgreSQL

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A bug that temptable can not be deleted

yugo-n opened this issue · comments

When a base table is changed by a user who is not the owner of the matview, the following error occurs.

test5=# create table t (i int);
CREATE TABLE
test5=# create incremental materialized view mv as select * from t;
SELECT 0
test5=# create user u1;
CREATE ROLE
test5=# grant SELECT on ALL tables in schema public to u1;
GRANT
test5=# grant insert on ALL tables in schema public to u1;
GRANT
test5=# \c test5 u1
You are now connected to database "test5" as user "u1".
test5=> insert into t values (1);
INFO:  <>
ERROR:  must be owner of table pg_temp_59410
CONTEXT:  SQL statement "DROP TABLE pg_temp_5.pg_temp_59410"