sraoss / pgsql-ivm

IVM (Incremental View Maintenance) development for PostgreSQL
Other
129 stars 12 forks source link

A bug that temptable can not be deleted #53

Closed yugo-n closed 4 years ago

yugo-n commented 4 years ago

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"