[HACKERS] Should a materialized view be based on a view?

2011-11-18 Thread Kevin Grittner
I still have a lot of reading to do before I propose anything
concrete for development, but one thing that has already struck me
as a common theme for MVs is that a lot of people seem to like the
idea of first creating a normal view, and then materializing it. 
That seems pretty attractive to me, too.  How do people feel about
that as a fundamental design decision: that a MV would always have
a corresponding view (under a different name or in a different
schema)?  Love it or hate it?
 
-Kevin

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Should a materialized view be based on a view?

2011-11-18 Thread Szymon Guz
On 18 November 2011 23:26, Kevin Grittner kevin.gritt...@wicourts.govwrote:

 I still have a lot of reading to do before I propose anything
 concrete for development, but one thing that has already struck me
 as a common theme for MVs is that a lot of people seem to like the
 idea of first creating a normal view, and then materializing it.
 That seems pretty attractive to me, too.  How do people feel about
 that as a fundamental design decision: that a MV would always have
 a corresponding view (under a different name or in a different
 schema)?  Love it or hate it?

 -Kevin



Hi Kevin,
maybe a stupid question... but why? It looks like for creating a function I
should create another function earlier. For me the design should be simple.
If you want to create something below my MV, thats fine for me, if I don't
need to know that (just like when creating a serial column).


regards
Szymon


Re: [HACKERS] Should a materialized view be based on a view?

2011-11-18 Thread Thom Brown
On 18 November 2011 22:26, Kevin Grittner kevin.gritt...@wicourts.gov wrote:
 I still have a lot of reading to do before I propose anything
 concrete for development, but one thing that has already struck me
 as a common theme for MVs is that a lot of people seem to like the
 idea of first creating a normal view, and then materializing it.
 That seems pretty attractive to me, too.  How do people feel about
 that as a fundamental design decision: that a MV would always have
 a corresponding view (under a different name or in a different
 schema)?  Love it or hate it?

Is there a need to create it as a normal view first?  Can't the CREATE
VIEW syntax be expanded to support MV capabilities? (CREATE [
MATERIALIZED ] VIEW...) And then ALTER VIEW can materialise a regular
view, or dematerialise a materialised view.

-- 
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers