Re: [BUGS] BUG #8542: Materialized View with another column_name does not work? - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: [BUGS] BUG #8542: Materialized View with another column_name does not work?
Date
Msg-id 1383294050.11657.YahooMailNeo@web162904.mail.bf1.yahoo.com
Whole thread Raw
In response to Re: [BUGS] BUG #8542: Materialized View with another column_name does not work?  (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>)
List pgsql-hackers
Ashutosh Bapat <ashutosh.bapat@enterprisedb.com> wrote:

> CREATE MATERIALIZED VIEW statement ends up being CREATE TABLE AS
> statement underneath with table type matview. In that case, why
> don't I see special treatment only for materialized view and not
> CTAS in general, which allows column names to specified like the
> case in the bug reported.

While the initial population of the matview is a lot like CTAS (and
so far shares some code), the critical difference is that CTAS
doesn't store a rule to support repopulating the table.  This issue
comes up in the validation of that rule for the matview.

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



pgsql-hackers by date:

Previous
From: Kevin Grittner
Date:
Subject: Re: [BUGS] BUG #8542: Materialized View with another column_name does not work?
Next
From: Craig Ringer
Date:
Subject: Re: How should row-security affects ON UPDATE RESTRICT / CASCADE ?