Re: Materialized views WIP patch - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: Materialized views WIP patch
Date
Msg-id 1361314044.27824.YahooMailNeo@web162904.mail.bf1.yahoo.com
Whole thread Raw
In response to Re: Materialized views WIP patch  (Kevin Grittner <kgrittn@ymail.com>)
Responses Re: Materialized views WIP patch  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Materialized views WIP patch  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Kevin Grittner <kgrittn@ymail.com>

> There was one minor syntax issue not addressed by Noah, nor much
> discussed in general that I didn't want to just unilaterally
> choose; but given that nobody seems to care that much I will put
> forward a proposal and do it that way tomorrow if nobody objects.
> Before this patch tables were the only things subject to
> truncation, but now materialized views can also be truncated.  So
> far we have been treating TABLE as a noise word in the truncate
> command.  I assume we still want to allow tables to be truncated
> with or without the word.  The question is what to do about
> materialized views, and wheter both can be specified on a single
> TRUNCATE statement.  I propose that we allow TABLE or MATERIALIZED
> VIEW to be specified, or that part of the statement to be left out.
> I propose that either type of object be allowed unless one or the
> other is specified and the object to be truncated is not of that
> kind.  So you could mix both kinds on one statement, so long as you
> didn't specify either kind.

When I went to do this, I hit a shift/reduce conflict, because with
TABLE being optional it couldn't tell whether:

TRUNCATE MATERIALIZED VIEW x, y, z;

... was looking for five relations or three.  That goes away with
MATERIALIZED escalated to TYPE_FUNC_NAME_KEYWORD.  Is that OK?

--
Kevin Grittner
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Materialized views WIP patch
Next
From: Simon Riggs
Date:
Subject: Re: posix_fadvise missing in the walsender