(thanks mr. apollo): https://gist.github.com/apolloclark/ea5466d5929e63043dcf
SELECT
con.conname AS constraint_name,
con.contype AS constraint_type,
pg_get_constraintdef(con.oid) AS constraint_definition
FROM
(thanks mr. apollo): https://gist.github.com/apolloclark/ea5466d5929e63043dcf
SELECT
con.conname AS constraint_name,
con.contype AS constraint_type,
pg_get_constraintdef(con.oid) AS constraint_definition
FROM