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 1383598412.78837.YahooMailNeo@web162901.mail.bf1.yahoo.com
Whole thread Raw
In response to Re: [BUGS] BUG #8542: Materialized View with another column_name does not work?  (Kevin Grittner <kgrittn@ymail.com>)
List pgsql-hackers
Kevin Grittner <kgrittn@ymail.com> wrote:
> Michael Paquier <michael.paquier@gmail.com> wrote:
>
>> I am not sure that adding a boolean flag introducing a concept
>> related to matview inside checkRuleResultList is the best
>> approach to solve that. checkRuleResultList is something related
>> only to rules, and has nothing related to matviews in it yet.
>
> Well, I was tempted to keep that concept in DefineQueryRewrite()
> where the call is made, by calling  the new bool something like
> requireColumnNameMatch and not having checkRuleResultList()
> continue to use isSelect for that purpose at all.
> DefineQueryRewrite() already references RELKIND_RELATION once,
> RELKIND_MATVIEW twice, and RELKIND_VIEW three times, so it would
> hardly be introducing a new concept there.

Upon reflection, that seemed to be cleaner.  Pushed fix that way.
Not much of a change from the previously posted patch, but attached
here in case anyone wants to argue against this approach.

Thanks for the report!

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

pgsql-hackers by date:

Previous
From: Jeff Janes
Date:
Subject: Re: Fast insertion indexes: why no developments
Next
From: Alexander Korotkov
Date:
Subject: Re: GIN improvements part 1: additional information