Skip to content

Instantly share code, notes, and snippets.

@ajepe

ajepe/constraint.sql

Created Oct 21, 2019
Embed
What would you like to do?
Check list of constraint on a table
SELECT con.* FROM pg_catalog.pg_constraint con INNER JOIN pg_catalog.pg_class rel ON rel.oid = con.conrelid INNER JOIN pg_catalog.pg_namespace nsp ON nsp.oid = connamespace WHERE nsp.nspname = 'public' AND rel.relname = 'product_product';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.