Re: Dropping all constraints in database

Поиск
Список
Период
Сортировка
От Glyn Astill
Тема Re: Dropping all constraints in database
Дата
Msg-id 810750.89007.qm@web26006.mail.ukl.yahoo.com
обсуждение исходный текст
Ответ на Dropping all constraints in database  (Lukasz Brodziak <lukasz.brodziak@gmail.com>)
Список pgsql-admin
> From: Lukasz Brodziak <lukasz.brodziak@gmail.com>
> Subject: [ADMIN] Dropping all constraints in database
> To: pgsql-admin@postgresql.org
> Date: Monday, 14 March, 2011, 9:26
> Hello,
>
> Is there a way of disabling/dropping all constrainsts in a
> given
> database? I need to restore a db which has duplicate values
> in nearly
> half of its tables then remove duplicates and then add the
> constraints
> back. Is there a way to do that for each table in one
> statement/function? It may be even a java/perl script if it
> can do
> such a thing. Thank You all in advance for help.
>
>

Magnus Hagander wrote about a method to do that here:

http://blog.hagander.net/archives/131-Automatically-dropping-and-creating-constraints.html




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

Предыдущее
От: Thomas Kellerer
Дата:
Сообщение: Re: Dropping all constraints in database
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: PSQLException: ERROR: could not open relation with OID xxxx