Skip to content

IMMV including expressions of aggregate results doesn't work #96

Description

@yugo-n
postgres=# create table s (i numeric, j numeric);
CREATE TABLE
postgres=# create view v_s as select sum(i)*0.5 as a, sum(i)/sum(j) as b from s;
CREATE VIEW
postgres=# create incremental materialized view mv_s as select sum(i)*0.5 as a, sum(i)/sum(j) as b from s;
SELECT 1
postgres=# select * from mv_s; select * from v_s;
 a | b 
---+---
   |  
(1 row)

 a | b 
---+---
   |  
(1 row)

postgres=# insert into s values (1,2);
INSERT 0 1
postgres=# select * from mv_s; select * from v_s;
 a | b 
---+---
   |  
(1 row)

  a  |           b            
-----+------------------------
 0.5 | 0.50000000000000000000
(1 row)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions