Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
yugo-n opened this issue Apr 24, 2020 · 0 comments
Open

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

yugo-n opened this issue Apr 24, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@yugo-n
Copy link
Collaborator

yugo-n commented Apr 24, 2020

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)
@yugo-n yugo-n self-assigned this May 1, 2020
yugo-n added a commit that referenced this issue May 13, 2020
thoshiai pushed a commit that referenced this issue May 14, 2020
IMMV is not supported for expresion which contains aggragate function 
in targetlist. Previously, There are cases in which column value of
IMMV is incorrect, bacause it was not checked  if it used the above
expression.

GitHub issue #96
@yugo-n yugo-n added the enhancement New feature or request label Dec 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant