On 2007-03-06, Gregory Stark <stark@enterprisedb.com> wrote:
> "Teodor Sigaev" <teodor@sigaev.ru> writes:
>>> A closer reading, however, shows that at least for cases like intarray,
>>> btree_gist, etc., the detoasting of an index value is being done in the
>>> gist decompress function, so the value seen via GISTENTRY in the other
>>> functions should already have been detoasted once.
>>
>> Right, any stored value form index should be decompressed by GiST decompress
>> support method.
>
> The problem is that this is the only place in the code where we make wholesale
> assumptions that a datum that comes from a tuple (heap tuple or index tuple)
> isn't toasted.
The places in the intarray code that you tried to "fix" in your patch at
the start of this thread are not dealing with data that came from a tuple,
but from data that came from a decompress method. It's expected that the
decompress method does the detoasting.
So I think you've mis-analyzed the problem. That's especially true since
you are claiming that the existing code is already buggy when in fact no
such bugs have been reported (and clearly intarray has been running with
toasted array values for years).
--
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services