| From: | Kevin Grittner <kgrittn(at)ymail(dot)com> | 
|---|---|
| To: | Peter Eisentraut <peter_e(at)gmx(dot)net> | 
| Cc: | Noah Misch <noah(at)leadboat(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Marko Tiikkaja <pgmail(at)joh(dot)to>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> | 
| Subject: | Re: Materialized views WIP patch | 
| Date: | 2013-02-20 22:03:36 | 
| Message-ID: | 1361397816.6744.YahooMailNeo@web162903.mail.bf1.yahoo.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-committers pgsql-hackers | 
Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> On 2/20/13 2:30 PM, Kevin Grittner wrote:
>>> Are there TRUNCATE triggers on materialized views?
>> No.  Nor SELECT, INSERT, UPDATE, or DELETE triggers.  You can't
>> create a trigger of any type on a materialized view.  I don't
>> think that would interfere with event triggers, though.
>
> More generally, I would consider the invalidation of a
> materialized view a DDL command, whereas truncating a table is a
> DML command.
The force of that assertion is somewhat undercut by the fact that
the ExecuteTruncate() function does exactly what needs to be done
to discard the data in a materialized view and make it appear as
non-scannable.  Even if we dress it up with different syntax, it's
not clear that we wouldn't build a TruncateStmt in the parser and
pass it through exactly the same execution path.  We would just
need to look at the relkind to generate a different command tag.
> This has various implications with triggers, logging,
> permissions.  I think it's not good to mix those two.
Could you give a more concrete example of where you see a problem?
--
Kevin Grittner
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tatsuo Ishii | 2013-02-21 00:45:01 | Re: Materialized views WIP patch | 
| Previous Message | Peter Eisentraut | 2013-02-20 21:25:50 | Re: Materialized views WIP patch | 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tatsuo Ishii | 2013-02-21 00:45:01 | Re: Materialized views WIP patch | 
| Previous Message | Alvaro Herrera | 2013-02-20 21:42:09 | Re: PATCH: Split stats file per database WAS: autovacuum stress-testing our system |