How muzzammil242/pgrecon works
pgrecon assesses Oracle migrations and converts supported schema objects without connecting to Oracle: a DBA runs the generated read-only extraction script, then local commands load its files, report deterministic findings, estimate effort, or emit PostgreSQL DDL plus named residue. The graph separates extraction, inventory/parsing, assessment, conversion, and CLI orchestration. Some converter and extraction implementations were not excerpted; their documented roles are shown, but uncertain internal calls are omitted.
Main entry points: schema.py Schema conversion · cli.py CLI commands · tables.py Table and partition DDL · engine.py Rule engine
Components 27
CLI workflows
- CLI commands
src/pgrecon/cli.py - Migration runbook
src/pgrecon/runbook.py
Oracle extraction
- SQL*Plus script
src/pgrecon/extract/__init__.py - Dump files
Inventory and parsing
- Dump loader
src/pgrecon/inventory/loader.py - SQLite inventory
- PL/SQL parsing
src/pgrecon/plsql/__init__.py - Parse tree walker
src/pgrecon/plsql/walk.py - Generated lexer
src/pgrecon/plsql/_generated/PlSqlLexer.py - Generated parser
src/pgrecon/plsql/_generated/PlSqlParser.py - Parse listener
src/pgrecon/plsql/_generated/PlSqlParserListener.py
Assessment
- Rule catalog
src/pgrecon/rules/__init__.py - Rule engine
src/pgrecon/rules/engine.py - Rule categories
src/pgrecon/rules - Findings
- Effort estimator
src/pgrecon/effort.py
Schema conversion
- Schema conversion
src/pgrecon/convert/schema.py - Table and partition DDL
src/pgrecon/convert/tables.py - Partition emission
src/pgrecon/convert/partitions.py - Identifier translation
src/pgrecon/convert/identifiers.py - Name registry
src/pgrecon/convert/namespace.py - Type mapping
src/pgrecon/convert/typemap.py - PL/SQL rewriting
src/pgrecon/convert/plsql_rewrite.py - Other DDL emitters
src/pgrecon/convert - Conversion residue
src/pgrecon/convert/residue.py - PostgreSQL DDL
Other components
- DBA
Connections 35
- DBA → SQL*Plus script: runs script
README.md - SQL*Plus script → Dump files: spools files
README.md - DBA → CLI commands: runs commands
README.md - CLI commands → SQL*Plus script: generates script
src/pgrecon/cli.py - CLI commands → Dump loader: loads dump
src/pgrecon/cli.py - Dump files → Dump loader: provides input
src/pgrecon/inventory/loader.py - Dump loader → SQLite inventory: writes inventory
src/pgrecon/inventory/loader.py - Dump loader → Parse tree walker: parses stored units
src/pgrecon/inventory/loader.py - Parse tree walker → PL/SQL parsing: uses parser
src/pgrecon/plsql/walk.py - PL/SQL parsing → Generated lexer: tokenizes with
src/pgrecon/plsql/__init__.py - PL/SQL parsing → Generated parser: parses with
src/pgrecon/plsql/__init__.py - Parse tree walker → Parse listener: walks parse events
src/pgrecon/plsql/walk.py - CLI commands → Rule engine: runs report
src/pgrecon/cli.py - Rule engine → SQLite inventory: queries inventory
src/pgrecon/rules/engine.py - Rule engine → Rule catalog: loads rules
src/pgrecon/rules/engine.py - Rule catalog → Rule categories: assembles categories
src/pgrecon/rules/__init__.py - Rule engine → Findings: produces
src/pgrecon/rules/engine.py - CLI commands → Effort estimator: estimates effort
src/pgrecon/cli.py - Effort estimator → Findings: uses findings
src/pgrecon/effort.py - CLI commands → Schema conversion: converts schema
src/pgrecon/cli.py - Schema conversion → SQLite inventory: reads inventory
README.md - Schema conversion → Table and partition DDL: emits tables
README.md - Schema conversion → Partition emission: emits partitions
README.md - Table and partition DDL → Identifier translation: translates names
src/pgrecon/convert/tables.py - Table and partition DDL → Type mapping: maps types
src/pgrecon/convert/tables.py - Table and partition DDL → Partition emission: uses partition logic
src/pgrecon/convert/tables.py - Schema conversion → Other DDL emitters: emits other objects
README.md - Other DDL emitters → PL/SQL rewriting: rewrites stored code
src/pgrecon/convert/code.py - PL/SQL rewriting → Identifier translation: uses translation helpers
src/pgrecon/convert/plsql_rewrite.py - PL/SQL rewriting → Type mapping: uses type mapping
src/pgrecon/convert/plsql_rewrite.py - Schema conversion → Name registry: tracks names
src/pgrecon/convert/namespace.py - Table and partition DDL → Name registry: claims names
src/pgrecon/convert/tables.py - Schema conversion → Conversion residue: records refusals
README.md - Schema conversion → PostgreSQL DDL: emits PostgreSQL DDL
README.md - Schema conversion → Migration runbook: offers guidance