Re: rename idx's with table; avoid confusing idx names?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: rename idx's with table; avoid confusing idx names?
Дата
Msg-id 8277.1133562824@sss.pgh.pa.us
обсуждение исходный текст
Ответ на rename idx's with table; avoid confusing idx names?  (george young <gry@ll.mit.edu>)
Список pgsql-sql
george young <gry@ll.mit.edu> writes:
> I put together a plpgsql function to rename a table and it's indexes
> correspondingly[see below].  I would like to know:

>   Is there a more robust/portable/clear way to do this?
>   Is this a bad idea for some subtle reason?

It won't work if the table and column names are so long as to require
truncation to form an index name.  Also there are some corner cases
in which you'll collide with existing index names.  (The underlying
backend index-name creation logic goes to some effort to generate
nonconflicting index names, but this code isn't doing any such thing.)
        regards, tom lane


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

Предыдущее
От: george young
Дата:
Сообщение: rename idx's with table; avoid confusing idx names?
Следующее
От: "James M Doherty"
Дата:
Сообщение: Re: Quote_literal()