Re: small hstore bugfixes for 9.0 (w/patch)

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: small hstore bugfixes for 9.0 (w/patch)
Date: 2010-09-16 03:47:32
Message-ID: 87ocbygxwc.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

>>>>> "Tom" == Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message BERTRAND Joel 2010-09-16 08:51:14 [8.4.4] Strange bus error on Solaris 10/sparc
Previous Message Andrew Gierth 2010-09-16 03:38:54 Re: small hstore bugfixes for 9.0 (w/patch)