postgres provider: support materialized view (implements #8791)