On 03.10.20 08:40, Peter Eisentraut wrote:
> I saw someone ask once for a schema diagram of the system catalogs.
> Things like that have occasionally been produced manually, but they are
> not regularly updated. That made me wonder, why can't we add primary
> and foreign keys to system catalogs and then have existing tools produce
> such a schema diagram automatically?
Given that these prerequisites have been accomplished in PostgreSQL 14,
I went back and made a little tool to convert the foreign-key
relationship information into a graphviz representation. The result
turns out to be pretty unwieldly and probably not something easily
suitable for the documentation; maybe someone wants to fine-tune the
graphviz settings to get a better view. My tool is at
<https://github.com/petere/pgcatviz>. Attached is a sample output.