From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Pavel <baros(dot)p(at)seznam(dot)cz> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Snapshot Materialized Views - GSoC |
Date: | 2010-05-21 13:59:05 |
Message-ID: | AANLkTikmjRekbYzSEyws3JDKIBwrb8wgcAgXQHlkj1t2@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2010/5/20 Pavel <baros(dot)p(at)seznam(dot)cz>:
> For this summer I have plan to make patch inplementing snapshot materialized
> views (MV). I believe it will not be end of effort to implement more of MV.
> But I / we need discuss MV syntax and exact behaviour so I have some
> questions about that for all of you:
>
> a) relkind for materialized view in pg_class?
> - I'm voting for char 'm' quite obvious why, but not sure about alias:
> 1 - RELKIND_MVIEW
> 2 - RELKIND_MATVIEW
> or any other ideas?
I think the prior question is whether we need to create a new relkind
at all. I'm prepared to believe that the answer is yes, but I'd like
to see a clear justification of why we can't use either 'v' or 'r'.
It seems to me that a materialized view is a lot like a regular old
table with a special rewrite rule attached to it somewhere.
> b) create MV syntax?
> - CREATE MATERIALIZED VIEW mvname AS ..., I think it is quite
> obvious to do so, but I had to ask
I think that's OK.
> c) refresh command syntax?
> 1 - ALTER MATERIALIZED VIEW mvname REFRESH
> or
> 2 - REFRESH MATERIALIZED VIEW mvname
1.
> d) what to do when someone use INSERT, UPDATE or DELETE against MV?
> 1 - raise error? - I prefer this option
> 2 - let commands change MV? (no chance to let changes propagate to
> source tables, not for this summer :)
> if pg lets user to DML against MV, I expect that triggers should work too
1.
> e) what to do when someone drop table or column?
> - it behave like it was a classic view. Fire error and hint
> - CASCADE option will remove MV
Agree.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company
From | Date | Subject | |
---|---|---|---|
Next Message | Massa, Harald Armin | 2010-05-21 14:02:48 | Re: Snapshot Materialized Views - GSoC |
Previous Message | Tom Lane | 2010-05-21 13:04:01 | Re: Specification for Trusted PLs? |