Re: Materialized views WIP patch - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject Re: Materialized views WIP patch
Date
Msg-id 20130307.074522.1755169086862119106.t-ishii@sraoss.co.jp
Whole thread Raw
In response to Re: Materialized views WIP patch  (Kevin Grittner <kgrittn@ymail.com>)
List pgsql-hackers
> Kevin Grittner <kgrittn@ymail.com> wrote:
>> Tatsuo Ishii <ishii@postgresql.org> wrote:
>>
>>> Was the remaining work on docs done? I would like to test MVs and
>>> am waiting for the docs completed.
>>
>> I think they are done.  If you notice anything missing or in need
>> of clarification please let me know.  At this point missing docs
>> would be a bug in need of a fix.

Ok.

> I decided to take another pass through to try to spot anyplace I
> might have missed.  I found that I had missed documenting the new
> pg_matviews system view, so I have just pushed that.
>
> I also think that something should be done about the documentation
> for indexes.  Right now that always refers to a "table".  It would
> clearly be awkward to change that to "table or materialized view"
> everywhere.  I wonder if most of thosse should be changed to
> "relation" with a few mentions that the relation could be a table
> or a materialized view, or whether some less intrusive change would
> be better.  Opinions welcome.

You might want to add small description about MVs to Tutorial
documentation "3.2 Views". Here is the current description of views in
the doc.

---------------------------------------------------------------------
3.2. Views

Refer back to the queries in Section 2.6. Suppose the combined listing
of weather records and city location is of particular interest to your
application, but you do not want to type the query each time you need
it. You can create a view over the query, which gives a name to the
query that you can refer to like an ordinary table:

CREATE VIEW myview AS   SELECT city, temp_lo, temp_hi, prcp, date, location       FROM weather, cities       WHERE city
=name; 

SELECT * FROM myview;

Making liberal use of views is a key aspect of good SQL database
design. Views allow you to encapsulate the details of the structure of
your tables, which might change as your application evolves, behind
consistent interfaces.

Views can be used in almost any place a real table can be
used. Building views upon other views is not uncommon.
---------------------------------------------------------------------
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp



pgsql-hackers by date:

Previous
From: "David E. Wheeler"
Date:
Subject: Re: Materialized views WIP patch
Next
From: Josh Berkus
Date:
Subject: Re: Enabling Checksums