pgsql: Avoid an Assert failure in deconstruct_array() by making

Поиск
Список
Период
Сортировка
От tgl@postgresql.org (Tom Lane)
Тема pgsql: Avoid an Assert failure in deconstruct_array() by making
Дата
Msg-id 20100709225739.8D3787541D5@cvs.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
Avoid an Assert failure in deconstruct_array() by making get_attstatsslot()
use the actual element type of the array it's disassembling, rather than
trusting the type OID passed in by its caller.  This is needed because
sometimes the planner passes in a type OID that's only binary-compatible
with the target column's type, rather than being an exact match.  Per an
example from Bernd Helmle.

Possibly we should refactor get_attstatsslot/free_attstatsslot to not expect
the caller to supply type ID data at all, but for now I'll just do the
minimum-change fix.

Back-patch to 7.4.  Bernd's test case only crashes back to 8.0, but since
these subroutines are the same in 7.4, I suspect there may be variant
cases that would crash 7.4 as well.

Modified Files:
--------------
    pgsql/src/backend/utils/cache:
        lsyscache.c (r1.170 -> r1.171)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/cache/lsyscache.c?r1=1.170&r2=1.171)

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

Предыдущее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Fix ruleutils' get_variable() to print something useful for Vars
Следующее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Avoid an Assert failure in deconstruct_array() by making