PostgreSQL Generate create Foreign keys from information_schema or pg_constraint
I think you are looking for pg_constraint_def, like in the following example:
SELECT pg_get_constraintdef(oid)
FROM pg_constraint
WHERE conname = 'child_accountid_itemid_fkey';