Re: Rename constraint?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Rename constraint?
Дата
Msg-id 13928.1051198875@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Rename constraint?  (Jeff Boes <jboes@nexcerpt.com>)
Список pgsql-admin
Jeff Boes <jboes@nexcerpt.com> writes:
> I have tables which were created with unnamed constraints:
> How can I identify and rename the "$2" and "$3" constraints?

Look in pg_relcheck or pg_constraint, depending on your PG version.
I think you should be able to get away with just updating the name
column.  (Not sure whether existing backend sessions will notice such
an update, but at worst starting a fresh session would make it take
effect.)

            regards, tom lane


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

Предыдущее
От: "dlangschied"
Дата:
Сообщение: Creating schema for multiple tables/fields/indices.
Следующее
От: Adam Witney
Дата:
Сообщение: Re: Creating schema for multiple tables/fields/indices.