Re: small hstore bugfixes for 9.0 (w/patch) - Mailing list pgsql-bugs

From Andrew Gierth
Subject Re: small hstore bugfixes for 9.0 (w/patch)
Date
Msg-id 87ocbygxwc.fsf@news-spur.riddles.org.uk
Whole thread Raw
In response to Re: small hstore bugfixes for 9.0 (w/patch)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
>>>>> "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.

pgsql-bugs by date:

Previous
From: Andrew Gierth
Date:
Subject: Re: small hstore bugfixes for 9.0 (w/patch)
Next
From: BERTRAND Joel
Date:
Subject: [8.4.4] Strange bus error on Solaris 10/sparc