The documentation paragraph for `includes_foreign_keys` now directs users to `only_foreign_keys` as the intended second pass. Regression coverage adds three cases: the FK-only emission for your cons example, the zero-row result for a table without FKs, and the error path.
I still think this model of only having options for foreign keys is incomplete, maybe wrong.
Imagine then cloning a schema from a publication server to be executed on a subscription server. So I don't want any other constraints besides the primary key, for example. The way you implemented it is not possible.
Furthermorehaving only_foreign_keys and includes_foreign_keys seems confuse.