Closed nuko-yokohama closed 4 years ago
Thank you for your reporting this! The discussion is here: https://www.postgresql.org/message-id/CAF3Gu1Z950HqQJzwanbeg7PmUXLc%2B7uZMstfnLeZM9iqDWeW9Q%40mail.gmail.com
We will fix this.
This issue is fixed on latest IVM branch and patch. Please close this issue, If there is no problem.
I confirmed that it was fixed. isuue is closed.
CREATE INCREMENTAL MATERIALIZED VIEW base_imv AS SELECT * FROM base
WHERE ts >= (now() - '3 second'::interval);
psql:timeshit.sql:10: ERROR: functions in IMMV must be marked IMMUTABLE
An expression SELECT statement that is not IMMUTABLE must not be specified when creating a view.
In the current implementation, a SELECT statement containing an expression that is not IMMUTABLE can be specified when creating a view. If an incremental materialized view is created from a SELECT statement that contains an expression that is not IMMUTABLE, applying the SELECT statement to the view returns incorrect results. To prevent this, we propose that the same error occur when a non-IMMUTABLE expression is specified in the "CREATE INDEX" statement.
The following is an inappropriate example.