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

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

Actually, since ghstore is not marked toastable (and hardly needs to
be, since its max length is 24 bytes), that function seems completely
useless.  Why isn't it just

    PG_RETURN_POINTER(PG_GETARG_POINTER(0));

(compare gbt_decompress in btree_gist, for instance).

            regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: small hstore bugfixes for 9.0 (w/patch)
Next
From: Tom Lane
Date:
Subject: Re: small hstore bugfixes for 9.0 (w/patch)