Re: record identical operator - Review

From: Kevin Grittner <kgrittn(at)ymail(dot)com>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Steve Singer <steve(at)ssinger(dot)info>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: record identical operator - Review
Date: 2013-09-20 14:31:23
Message-ID: 1379687483.54174.YahooMailNeo@web162904.mail.bf1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Stephen Frost <sfrost(at)snowman(dot)net> wrote:
> On Friday, September 20, 2013, Kevin Grittner  wrote:
>> Stephen Frost <sfrost(at)snowman(dot)net> wrote:
>>
>>> The issue here is that we're trying to make the mat view look
>>> like what the query would do when run at the same time, which
>>> is a bit of a losing battle, imv.
>>
>> If we're not doing that, I don't see the point of matviews.
>
> When taken out of context, I can see how that might not come
> across correctly. I was merely pointing out that it's a losing
> battle in the context of types which have equality operators
> which claim equalness but cast to text with results that don't
> match there.

I think the patch I've submitted wins that battle.  The only oddity
is that if someone uses a query for a matview which can provide
results with rows which are equal to previous result rows under the
default record opclass but different under this patch's opclass,
RMVC could update to the latest query results when someone thinks
that might not be necessary.  Workarounds would include using a
query with deterministic results (like using the upper() or lower()
function on a grouped citext column in the result set) or not using
the CONCURRENTLY option.  Neither seems too onerous.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2013-09-20 14:47:24 Re: Freezing without write I/O
Previous Message Dean Rasheed 2013-09-20 14:24:37 Re: psql tab completion for updatable foreign tables