Use this when you’re changing a table or a shared crate and want to know what depends on it.
Sources
Columns are not represented as separate nodes.
How PostgreSQL introspection works
1
Connect read-only
Graphify opens a
READ ONLY serializable transaction. It never writes to your database.2
Read the catalog
It lists tables, views, and routines from
information_schema, skipping the system schemas.3
Rebuild DDL
It reconstructs the schema as SQL and runs it through the same parser used for
.sql files.See it in action
PGHOST, PGUSER, PGPASSWORD, and PGDATABASE environment variables, which keeps the password out of your shell history:
Configure
- Least privilege
- CI
Create a role that can read the catalog and nothing else. Graphify needs no access to table data.
Verify and troubleshoot
Which databases are supported?
Which databases are supported?
PostgreSQL for live introspection. Any dialect the SQL parser understands works from
.sql files.Does Graphify read rows?
Does Graphify read rows?
No. Only catalog metadata: names, definitions, and relationships.
Flags
The
postgres extra installs both psycopg[binary] and tree-sitter-sql. Introspection rebuilds DDL and parses it with the SQL grammar, and without that grammar it returns 0 nodes. If a --postgres run produces no tables, reinstall the extra:
.sql files without a database, install the sql extra (tree-sitter-sql).
Try it with a SQL file
You can try this without a database. Install thesql extra and extract a schema file:
schema.sql
references edge, and the view as reads_from edges to both tables. Column definitions don’t become nodes.
FAQ
Does Graphify write to the database? No. The connection is read-only. Can I keep the password out of my shell history? Yes. Pass--postgres "" and set the standard PG* environment variables.
What’s next
PR impact
See what a schema change touches.
Multiple repositories
Join a database graph with several services.
Try it in Graphify
We build and host the graph for you. Start with a 14-day Pro trial, then keep up to 3 repositories on Free. No card required.