Re: record identical operator - Mailing list pgsql-hackers

From Andres Freund
Subject Re: record identical operator
Date
Msg-id 20130914130948.GF7437@awork2.anarazel.de
Whole thread Raw
In response to Re: record identical operator  (Kevin Grittner <kgrittn@ymail.com>)
Responses Re: record identical operator
List pgsql-hackers
On 2013-09-13 19:20:11 -0700, Kevin Grittner wrote:
> Andres Freund <andres@2ndquadrant.com> wrote:
> 
> > Not one that's dependendant on padding bytes, null bitmaps that
> > can or cannot be present and such.
> 
> Can you provide an example of where that's an issue with this
> patch?

I haven't yet tested your patch, but what I am talking about is that
e.g.: SELECT (ARRAY[1,2,3,NULL])[1:3] = ARRAY[1,2,3];
obviously should be true. But both arrays don't have the same binary
representation since the former has a null bitmap, the latter not.
So, if you had a composite type like (int4[]) and would compare that
without invoking operators you'd return something false in some cases
because of the null bitmaps.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Andrew Gierth
Date:
Subject: Re: Re: Proposal/design feedback needed: WITHIN GROUP (sql standard ordered set aggregate functions)
Next
From: Pavel Stehule
Date:
Subject: Re: unaccent module - two params function should be immutable