Search code examples
postgresqlreportpgadmin

Generating all 'data dictionary' reports under each 'object' in postgres


I have a database with about 50 something tables. I would like to run the report "Data Dictionary" on each table.

Ideally, I would like them all to be in one report, for example, in PGAdminIII, if I right click select "Tables" I will get a report of all the 'objects' and under each one a data dictionary report.

Is there an automatic way of doing this, or an plugin that I can install to postgres? Or is there something analogous to this?


Solution

  • If I understand correctly, you're referring to the ability to right mouse click on a table in PgAdminIII and select Reports > Data Dictionary report?

    I'm not aware of any way to do that from PgAdminIII. You could look into using a different tool such as SchemaSpy. Another option (as alluded to by @kgrittn) is to use psql \d with the \H flag to generate html output. My solution (since SchemaSpy didn't do what I needed, and I needed the same output for both Postgres and Oracle) was to roll my own using perl, DBD::Pg and Template::Toolkit.

    Update: Added GitHub link.