pgsql: Fix two new-in-9.0 bugs in hstore.

Поиск
Список
Период
Сортировка
От tgl@postgresql.org (Tom Lane)
Тема pgsql: Fix two new-in-9.0 bugs in hstore.
Дата
Msg-id 20100916025407.16A9D7541E2@cvs.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
Fix two new-in-9.0 bugs in hstore.

There was an incorrect Assert in hstoreValidOldFormat(), which would cause
immediate core dumps when attempting to work with pre-9.0 hstore data,
but of course only in an assert-enabled build.

Also, ghstore_decompress() incorrectly applied DatumGetHStoreP() to a datum
that wasn't actually an hstore, but rather a ghstore (ie, a gist signature
bitstring).  That used to be harmless, but could now result in misbehavior
if the hstore format conversion code happened to trigger.  In reality,
since ghstore is not marked toastable (and doesn't need to be), this
function is useless anyway; we can lobotomize it down to returning the
passed-in pointer.

Both bugs found by Andrew Gierth, though this isn't exactly his proposed
patch.

Tags:
----
REL9_0_STABLE

Modified Files:
--------------
    pgsql/contrib/hstore:
        hstore_compat.c (r1.2 -> r1.2.4.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/contrib/hstore/hstore_compat.c?r1=1.2&r2=1.2.4.1)
        hstore_gist.c (r1.12 -> r1.12.4.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/contrib/hstore/hstore_gist.c?r1=1.12&r2=1.12.4.1)

В списке pgsql-committers по дате отправления:

Предыдущее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Fix two new-in-9.0 bugs in hstore.
Следующее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Fix bad grammar.