Skip to content

Instantly share code, notes, and snippets.

@boo1ean
Last active May 16, 2019 08:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boo1ean/9c5c9b65615cd9996f38 to your computer and use it in GitHub Desktop.
Save boo1ean/9c5c9b65615cd9996f38 to your computer and use it in GitHub Desktop.
Disable constraints in postgres
-- 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