I have pretty simple table in PostgreSQL database which looks like this:
| ID | REPORT_TYPE | STATUS | USER_EMAIL |
|--------------------------------------------|
| 1 | sms | 0 | bob@gmail.com |
| 2 | call | 1 | mark@gmail.com |
| 3 | internet | 2 | kate@gmail.com |
Lets call this table REPORTS
. I created Materialized View (REPORTS_MV
) which has all records with status 0 from the table.
Question: If someone change the values inside the table, I want to change that values inside the materialized view too. How to track a changes inside the table and refresh materialized view?