Re: Inconsistency between attname of index and attname of relation

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Inconsistency between attname of index and attname of relation
Дата
Msg-id 2032.1562336531@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Inconsistency between attname of index and attname of relation  (Ronan Dunklau <ronan_dunklau@ultimatesoftware.com>)
Ответы Re: Inconsistency between attname of index and attname of relation  (Ronan Dunklau <ronan_dunklau@ultimatesoftware.com>)
Список pgsql-hackers
Ronan Dunklau <ronan_dunklau@ultimatesoftware.com> writes:
> I've noticed that renaming an indexed column produces inconsistencies in
> the catalog. Namely, the attname of the attribute of the relation is
> properly updated, whereas the attname of the attribute in the index is not,
> and keeps the old value.

If memory serves, we used to try to rename index columns, and gave up
on that because it caused problems of its own.  That's (one reason) why
modern versions of psql show a "definition" column in \d of an index.

> I think this could be considered a bug in Postgres.

It is not.

> If it isn't, what
> should be the proper way to retrieve this information ?

psql uses pg_get_indexdef(), looks like.

            regards, tom lane



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: [PATCH] Implement uuid_version()
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [PATCH] Implement uuid_version()