Re: record identical operator

From: Kevin Grittner <kgrittn(at)ymail(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>, Noah Misch <noah(at)leadboat(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: record identical operator
Date: 2013-09-16 21:39:30
Message-ID: 1379367570.9782.YahooMailNeo@web162904.mail.bf1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
> On 2013-09-16 16:58:21 -0400, Noah Misch wrote:
>> memcmp() has served well for HOT and for _equalConst(); why
>> would it suddenly fall short for MV maintenance?
>
> I don't have a problem using it internally, I have a problem
> exposing the capability to sql.

... like we do in *pattern ops and the
suppress_redundant_updates_trigger() function?

> Don't tell me that's the same.

No, this gives users a way to make the same test that HOT uses for
whether values match, albeit undocumented.  Well, not exactly the
same test, because this patch detoasts before comparing -- but
pretty close.  The question is, if it's unsafe for a user to make
this test, why would it be safe for HOT to use it?

I'm really having trouble understanding what problem you have with
this.  Can you describe a scenario where someone shoots themselves
in the foot with it, because I'm not seeing any?

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2013-09-16 21:58:46 Re: record identical operator
Previous Message Antonin Houska 2013-09-16 21:21:24 Dead function argument?