>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:
>> The gist one is just that the old code was abusing DatumGetHStoreP
>> by applying it to something that wasn't an hstore. This didn't
>> matter before the format upgrade code was put in, and it didn't
>> show up in tests because you need to index a very large number of
>> hstores before any problem shows up.
Tom> Actually, since ghstore is not marked toastable (and hardly
Tom> needs to be, since its max length is 24 bytes), that function
Tom> seems completely useless. Why isn't it just
Tom> PG_RETURN_POINTER(PG_GETARG_POINTER(0));
Tom> (compare gbt_decompress in btree_gist, for instance).
I don't know. The function was like that before I got involved with it;
I can only assume it was cargo-culted in from some data type in which
the gist keys were toastable. It looks a whole lot like several of Oleg
and Teodor's other GiST modules (e.g. ltree, pg_trgm - I suspect that
the pg_trgm one is just as useless, though I haven't read enough of that
code to be sure.)
--
Andrew.