Last active
May 16, 2019 08:39
-
-
Save boo1ean/9c5c9b65615cd9996f38 to your computer and use it in GitHub Desktop.
Disable constraints in postgres
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- As superuser you can connect to the target database | |
\c best-database | |
-- Drop specific table triggers | |
alter table foo disable trigger all; | |
-- After you dirty work don't forget to reenable triggers | |
alter table foo enable trigger all; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment