Re: ALTER INDEX .. RENAME allows to rename tables/views as well

Поиск
Список
Период
Сортировка
От Bossart, Nathan
Тема Re: ALTER INDEX .. RENAME allows to rename tables/views as well
Дата
Msg-id F681D64D-8C81-4665-8ABE-D8DCF1A8E511@amazon.com
обсуждение исходный текст
Ответ на Re: ALTER INDEX .. RENAME allows to rename tables/views as well  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: ALTER INDEX .. RENAME allows to rename tables/views as well  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 10/6/21, 1:52 PM, "Bruce Momjian" <bruce@momjian.us> wrote:
> I can confirm this bug in git head, and I think it should be fixed.

Here's a patch that ERRORs if the object type and statement type do
not match.  Interestingly, some of the regression tests were relying
on this behavior.  I considered teaching RenameRelation() how to
handle such mismatches, but we have to choose the lock level before we
know the object type, so that might be more trouble than it's worth.

I'm not too happy with the error message format, but I'm not sure we
can do much better without listing all the object types or doing some
more invasive refactoring.

Nathan


Вложения

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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: BUG #17212: pg_amcheck fails on checking temporary relations
Следующее
От: Tom Lane
Дата:
Сообщение: Re: ALTER INDEX .. RENAME allows to rename tables/views as well