On Sun, Jan 24, 2016 at 11:12 PM, drum.lucas@xxxxxxxxx <drum.lucas@xxxxxxxxx> wrote: > So, I made a SELECT to get some data, to see where's the issue: > > SELECT * FROM integrations.accounts WHERE qb_settings IS NULL OR > xero_settings IS NULL OR freshbooks_settings IS NULL OR myob_settings IS > NULL OR ppy_settings IS NULL; If you have a check constraint X, and you want to find all the rows that are currently NOT X, you are using the wrong query here. You need to AND your parts together. Look up DeMorgan's laws for boolean logic. -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general