Re: Rename or Re-Create Constraints?

Поиск
Список
Период
Сортировка
Искать
От
Carlos Mennens
Тема
Re: Rename or Re-Create Constraints?
Дата
Msg-id
BANLkTikxrxuRWfqPWPPD1oLGSZ=b4kLOng@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Rename or Re-Create Constraints? Carlos Mennens <carlos.mennens@gmail.com>
Re: Rename or Re-Create Constraints? Tom Lane <tgl@sss.pgh.pa.us>
Re: Rename or Re-Create Constraints? Carlos Mennens <carlos.mennens@gmail.com>
Re: Rename or Re-Create Constraints? Tom Lane <tgl@sss.pgh.pa.us>
Re: Rename or Re-Create Constraints? Carlos Mennens <carlos.mennens@gmail.com>
Re: Rename or Re-Create Constraints? Adrian Klaver <adrian.klaver@gmail.com>
Re: Rename or Re-Create Constraints? Adrian Klaver <adrian.klaver@gmail.com>
Re: Rename or Re-Create Constraints? Carlos Mennens <carlos.mennens@gmail.com>
Re: Rename or Re-Create Constraints? Rob Sargent <robjsargent@gmail.com>
On Fri, Apr 8, 2011 at 8:35 PM, Tom Lane  wrote:
> I believe you can rename the underlying indexes and the constraints will
> follow them.  (This works in HEAD anyway, not sure how far back.)

I'm sorry but I don't understand what that means or how to relate that
to a SQL command to rename the constraint. Do you have an example of
how that command would look?

>> 2. When renaming the table, is there a way to rename both the table
>> and all associated constraints?
>
> No, there's nothing automatic for that.  IIRC there used to be code to
> try to do this when you renamed a single column; but we took it out,
> probably because it risked unexpected failures due to index name
> collisions.
>
>                        regards, tom lane
>
В списке pgsql-general по дате отправления
От: Tom Lane
Дата:
От: Rob Sargent
Дата:
FAQ