Andres Freund <andres@2ndquadrant.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