Re: index on function confuses drop table cascade on child

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: index on function confuses drop table cascade on child
Дата
Msg-id 8009.1288654520@sss.pgh.pa.us
обсуждение исходный текст
Ответ на index on function confuses drop table cascade on child  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Ответы Re: index on function confuses drop table cascade on child  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> create index t_sname on t (sname(t));

Huh, interesting.  The reason the DROP misbehaves is that the index
doesn't have any dependency at all on table "t".  Which appears to
be exposing the folly of this bit in find_expr_references_walker:

        /*
         * A whole-row Var references no specific columns, so adds no new
         * dependency.
         */
        if (var->varattno == InvalidAttrNumber)
            return false;

This is broken at least as far back as 8.1.  Surprising no one's noticed
before.

            regards, tom lane

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

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: BUG #5739: postgresql will not start
Следующее
От: Tom Lane
Дата:
Сообщение: Re: index on function confuses drop table cascade on child