agora inbox for pgsql-docs@postgresql.org  
help / color / mirror / Atom feed
From: Wim Bertels <wim.bertels@ucll.be>
To: forsberg@efod.se <forsberg@efod.se>
To: pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>
Subject: Re: Example on difference between CREATE MATERIALIZED VIEW and standard VIEW has typo
Date: Mon, 25 Aug 2025 07:54:51 +0000
Message-ID: <fc390f4053116a8fdb4a390aa4fe148a28b107c0.camel@ucll.be> (raw)
In-Reply-To: <175578522105.806.9299577429321382358@wrigleys.postgresql.org>
References: <175578522105.806.9299577429321382358@wrigleys.postgresql.org>

Hello,

that is just the point:

cf
"
are that the materialized view cannot subsequently be directly updated
and that the query used to create the materialized view is stored in
exactly the same way that a view's query is stored, so that fresh data
can be generated for the materialized view with:
"

although that the wording might be better? (non-native speaker)

"
the content of both objects is the same, but the content of the table
is not linked to the query, whereas the materialized view does have
this information of that query, so that fresh data can be generated for
the materialized view without explicitly specifying the query that was
used to generate the object
"

mvg,
Wim

PG Doc comments form schreef op do 21-08-2025 om 14:07 [+0000]:
> 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;



view thread (4+ messages)

Message-ID: <fc390f4053116a8fdb4a390aa4fe148a28b107c0.camel@ucll.be>
Permalink:  ../fc390f4053116a8fdb4a390aa4fe148a28b107c0.camel@ucll.be/
Also on:    postgresql.org/message-id/fc390f4053116a8fdb4a390aa4fe148a28b107c0.camel@ucll.be

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: wim.bertels@ucll.be, forsberg@efod.se, pgsql-docs@lists.postgresql.org
  Subject: Re: Example on difference between CREATE MATERIALIZED VIEW and standard VIEW has typo
  In-Reply-To: <fc390f4053116a8fdb4a390aa4fe148a28b107c0.camel@ucll.be>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox