pgsql: Fix SysCacheGetAttr() to handle the case where the specified

Поиск
Список
Период
Сортировка
От tgl@postgresql.org (Tom Lane)
Тема pgsql: Fix SysCacheGetAttr() to handle the case where the specified
Дата
Msg-id 20061006182335.CAEA39FB40F@postgresql.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
Fix SysCacheGetAttr() to handle the case where the specified syscache has not
been initialized yet.  This can happen because there are code paths that call
SysCacheGetAttr() on a tuple originally fetched from a different syscache
(hopefully on the same catalog) than the one specified in the call.  It
doesn't seem useful or robust to try to prevent that from happening, so just
improve the function to cope instead.  Per bug#2678 from Jeff Trout.  The
specific example shown by Jeff is new in 8.1, but to be on the safe side
I'm backpatching 8.0 as well.  We could patch 7.x similarly but I think
that's probably overkill, given the lack of evidence of old bugs of this ilk.

Modified Files:
--------------
    pgsql/src/backend/utils/cache:
        catcache.c (r1.133 -> r1.134)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/cache/catcache.c.diff?r1=1.133&r2=1.134)
        syscache.c (r1.107 -> r1.108)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/cache/syscache.c.diff?r1=1.107&r2=1.108)
    pgsql/src/include/utils:
        catcache.h (r1.62 -> r1.63)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/catcache.h.diff?r1=1.62&r2=1.63)

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

Предыдущее
От: petere@postgresql.org (Peter Eisentraut)
Дата:
Сообщение: pgsql: Message style improvements
Следующее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Fix SysCacheGetAttr() to handle the case where the specified