Re: Dropping all constraints in database

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: Lukasz Brodziak <lukasz.brodziak@xxxxxxxxx>
> Subject:  Dropping all constraints in database
> To: pgsql-admin@xxxxxxxxxxxxxx
> 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




-- 
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux