sraoss / pgsql-ivm

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

count(*) causes an weired syntax error message #23

Closed tatsuo-ishii closed 3 years ago

tatsuo-ishii commented 5 years ago
 create incremental materialized view mv1 as select count(*),avg(abalance),min(abalance),max(abalance) from pgbench_accounts;
2019-09-22 06:25:09.264 JST [31280] ERROR:  syntax error at or near "base_type" at character 1
2019-09-22 06:25:09.264 JST [31280] STATEMENT:  base_type,
        SFUNC = sfunc,

    create incremental materialized view mv1 as select count(*),avg(abalance),min(abalance),max(abalance) from pgbench_accounts;
ERROR:  syntax error at or near "base_type"
LINE 1: base_type,
        ^
yugo-n commented 5 years ago

I can not reproduce this using the latest IVM branch code. Could you reconfirm this?

issue23=# create incremental materialized view mv1 as select count(*),avg(abalance),min(abalance),max(abalance) from pgbench_accounts; SELECT 1

yugo-n commented 5 years ago

The statements which appear in the log output seems related to CREATE AGGREGATE but these are not performed in our codes. One possibility is that our code accidentally refer some garbage remained in the memory due to regression test. Although this must not occur of course because string buffers should be initialized before used, I'll recheck my code carefully.

yugo-n commented 4 years ago

@tatsuo-ishii We have not observe this phenomenon yet, so may we close this issue? If this occurs again, let's reopen this or open new one.

yugo-n commented 3 years ago

We have not seen this problem for a long time, so I will close this. If we find this again, it will be reopened.