Re: Dropped index on table preventing rule creation

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Dropped index on table preventing rule creation
Дата
Msg-id 15556.1316059095@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Dropped index on table preventing rule creation  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Dropped index on table preventing rule creation
Список pgsql-bugs
Robert Haas <robertmhaas@gmail.com> writes:
> I spent some more time looking at this tonight.  I am wondering if
> perhaps we should just get rid of relhasindex.

-1, there is absolutely no reason to believe that's a good idea.

> ... I think we could fix Thom's complaint by changing
> DefineQueryRewrite() to call RelationGetIndexList() rather than
> blindly believing relhasindex, which would be maybe a five line
> code-change.  We'd probably also want to change
> SetRelationRuleStatus() to clear relhasindex, which would be one more
> line of code.

Yeah, that's about what it would take, but what I'm asking is why
bother.  The *only* case that we support here is turning a just-created,
not-fooled-with table into a view, and I don't feel a need to promise
that we will handle other cases (which are inevitably going to be poorly
tested).  See for example the adjacent relhassubclass test, which has
got exactly the same issue.

> One related thing that seems worth doing is ripping out relhaspkey,

Having a hard time getting excited about that either ...

            regards, tom lane

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

Предыдущее
От: "Eduardo Piombino"
Дата:
Сообщение: BUG #6207: fali to get lock on parent table after two consecutive updates to the same row in child table
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #6205: ERROR: temporary tables cannot specify a schema name