Re: Materialized views WIP patch

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Greg Stark <stark(at)mit(dot)edu>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Kevin Grittner <kgrittn(at)ymail(dot)com>, 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-21 08:54:06
Message-ID: 20130221085406.GA14586@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On 2013-02-21 04:14:09 +0000, Greg Stark wrote:
> On Wed, Feb 20, 2013 at 9:25 PM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> > More generally, I would consider the invalidation of a materialized view
> > a DDL command, whereas truncating a table is a DML command.
>
> That's not entirely true. From the database's point of view, TRUNCATE
> is in many ways actually DDL.
>
> I actually don't really dislike using "TRUNCATE" for this command. I
> was more asking about whether this meant people were thinking of the
> view as a thing where you could control the data in it by hand and
> could have the view be "empty" rather than just "not valid".

It also might get confusing when we get materialized views that are
auto-updateable. I am not suggesting to forward TRUNCATE to the internal
storage in that case but giving an error so its an easy to find
distinction to a normal table seems like a good idea.

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2013-02-21 10:27:48 pgsql: Add postgres_fdw contrib module.
Previous Message Tom Lane 2013-02-21 08:31:17 Re: Materialized views WIP patch

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-02-21 10:30:27 Re: FDW for PostgreSQL
Previous Message Daniel Farina 2013-02-21 08:53:36 Re: Unarchived WALs deleted after crash