Example on difference between CREATE MATERIALIZED VIEW and standard VIEW has typo

From: PG Doc comments form <noreply(at)postgresql(dot)org>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Cc: forsberg(at)efod(dot)se
Subject: Example on difference between CREATE MATERIALIZED VIEW and standard VIEW has typo
Date: 2025-08-21 14:07:01
Message-ID: 175578522105.806.9299577429321382358@wrigleys.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-docs

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/17/rules-materializedviews.html
Description:

Unless I'm completely mistaken, the second code example on
https://www.postgresql.org/docs/current/rules-materializedviews.html, i.e
this:

CREATE TABLE mymatview AS SELECT * FROM mytab;

Should instead by

CREATE VIEW mymatview AS SELECT * FROM mytab;

(I.e, create a VIEW, not a TABLE).

Could also be debated if the view name should be the same in both examples.
I.e the second example might be even better as below:

CREATE VIEW myview AS SELECT * from mytab;

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message PG Doc comments form 2025-08-21 15:20:40 Inaccurate statement about log shipping replication mode
Previous Message Jeff Davis 2025-08-20 21:55:52 Re: Initcap works differently with different locale providers