top | item 39799436

(no title)

abi | 1 year ago

Is there a similar one for Postgres? I’d love to use it.

discuss

order

thristian|1 year ago

Years ago I wrote something similar for PostgreSQL. Unlike SQLite, it supports[1] the much richer "information_schema" database schema that's defined by the SQL standard. As long as you can figure out how it represents tables, columns, and primary and foreign keys, it shouldn't be too difficult to adapt this SQL query to fit. After all, reshaping relational data to extract the information you need is what SQL is for.

[1]: https://www.postgresql.org/docs/current/information-schema.h...

ccakes|1 year ago

tbls[1] is a similar tool in this space that does a great job and is a simple single binary

Covers a lot of different platforms incl Postgres

[1] https://github.com/k1LoW/tbls

Vuizur|1 year ago

You can use DBeaver to get a good diagram for almost all RDBMs.

dmfay|1 year ago

My project pdot^1 has a full-ERD mode but it's honestly less useful than the semi-interactive/contextual mode of navigating schema subgraphs in a database of any size. pdot can output mermaid and render other graphs too, like trigger cascades and grant inheritance.

^1 https://gitlab.com/dmfay/pdot