Re: texteq/byteaeq: avoid detoast [REVIEW] - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: texteq/byteaeq: avoid detoast [REVIEW]
Date
Msg-id 4D354935.7090702@enterprisedb.com
Whole thread Raw
In response to Re: texteq/byteaeq: avoid detoast [REVIEW]  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: texteq/byteaeq: avoid detoast [REVIEW]  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-hackers
On 17.01.2011 22:33, Tom Lane wrote:
> Peter Eisentraut<peter_e@gmx.net>  writes:
>> On mån, 2011-01-17 at 07:35 +0100, Magnus Hagander wrote:
>>> In fact, aren't there cases where the *length test* also fails?
>
>> Currently, two text values are only equal of strcoll() considers them
>> equal and the bits are the same.  So this patch is safe in that regard.
>
>> There is, however, some desire to loosen this.
>
> That isn't ever going to happen, unless you'd like to give up hash joins
> and hash aggregation on text values.

You could canonicalize the string first in the hash function. I'm not 
sure if we have all the necessary information at hand there, but at 
least with some encoding/locale-specific support functions it'd be possible.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Replication logging
Next
From: Itagaki Takahiro
Date:
Subject: Re: texteq/byteaeq: avoid detoast [REVIEW]