Snapshot Materialized Views - GSoC - Mailing list pgsql-hackers

First of all, I really appreciate you gave me change to participate on 
GSoC. It's great chance for me.

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?
 

b) create MV syntax?   - CREATE MATERIALIZED VIEW mvname AS ..., I think it is quite
obvious to do so, but I had to ask

c) refresh command syntax?     1 - ALTER MATERIALIZED VIEW mvname REFRESH     or     2 - REFRESH MATERIALIZED VIEW
mvname

d) what to do when someone use INSERT, UPDATE or DELETE against MV?   1 - raise error? - I prefer this option   2 - let
commandschange 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

e) what to do when someone drop table or column?  - it behave like it was a classic view. Fire error and hint  -
CASCADEoption will remove MV
 

ERROR:  cannot drop table adresa because other objects depend on it
DETAIL:  materialized view adresa_mv depends on table adresa
HINT:  Use DROP ... CASCADE to drop the dependent objects too.





pgsql-hackers by date:

Previous
From: Robert Creager
Date:
Subject: Fwd: PGBuildfarm member colugos Branch HEAD Status changed from OK to StartDb-C:3 failure
Next
From: Tom Lane
Date:
Subject: Re: ExecutorCheckPerms() hook