pg_plsql_graphs
pg_plsql_graphs · Capture PL/pgSQL control-flow and dependence graphs for DOT export
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 100641 | pg_plsql_graphs | pg_plsql_graphs | 1.0 | LANG | Unknown | C |
Usage
Sources:
pg_plsql_graphs 1.0 captures control-flow and data-dependence graphs when PL/pgSQL functions run, exposes the DOT text through views, and lets a client export it for Graphviz. It is an old experimental instrumentation module, not a static analyzer for every function in a database.
Core Workflow
The documented build integrates iGraph into the PostgreSQL source tree. Preload the module, restart PostgreSQL, and create the extension.
pg_plsql_graphs shows indented flow and dependence graphs for called functions; pg_plsql_graphs_trimmed is intended for export. The two pg_plsql_last_* views expose the most recently captured graphs.
Caveats
The README targets PostgreSQL 9.3-era sources and iGraph 0.7.1, and requires invasive server build changes plus a preload hook. Captured state is in memory and tied to function execution. Treat it as isolated research tooling: test server compatibility and hook interactions, avoid sensitive function bodies, and do not rely on it as durable audit data.