Thomas Kellerer <spam_eater@xxxxxxx> writes: > I'm currently adding the support for materialized views to my SQL tool, and noticed that when creating a materialized view, a rewrite rule is also created that looks just like a rewrite rule for a "normal" view. Yup. > As the materialized view should be a "table" that can be selected from, I wonder what the purpose of the rewrite rule is? To store the matview's definition for use in REFRESH. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general