pgrecon 0.2.0
pgrecon converts now.
- pgrecon convert emits PostgreSQL DDL from the inventory, offline:
tables under a documented type mapping, primary and unique keys,
checks, foreign keys, and secondary indexes; everything the
converter cannot port faithfully lands in a residue report naming
the object and the reason instead of becoming wrong DDL. - Partition bounds are extracted (HIGH_VALUE through the same chunked
path as check conditions, subpartitions included) and converted to
native partition children: RANGE with MAXVALUE, LIST with DEFAULT,
HASH with MODULUS/REMAINDER, and composite shapes. Interval-driven
creation carries a note pointing at scheduled creation such as
pg_partman. - The rest of schema structure converts: sequences restarted at their
extracted position with bigint-safe bounds, schema-local synonyms
as updatable views, database links scaffolded as oracle_fdw
servers, column defaults, and virtual columns as generated columns. - The converter grows a code lane: standalone functions and
procedures whose every construct is provably equivalent convert
mechanically to PL/pgSQL, comments and formatting carried through.
SELECT INTO becomes INTO STRICT so NO_DATA_FOUND still raises;
cursor%ROWTYPE becomes a record variable; NVL, SYSDATE, sequence
NEXTVAL, DBMS_OUTPUT.PUT_LINE, EXECUTE IMMEDIATE, q-quoted
literals, and FROM DUAL all translate. Everything semantic refuses
by name and line into the residue report, and a routine that calls
a refused routine is refused with it. Function bodies are validated
by PostgreSQL itself: the emitted DDL applies with
check_function_bodies on, never disabled. - Views transpile with (+) outer joins folded to ANSI; CONNECT BY,
database-link reads, and object-relational methods refuse with
named reasons.
The full output of the test estates applies to a live PostgreSQL 16
at zero errors, and the converted routines were executed there to
confirm behavior. See CHANGELOG.md for details.