Reference

PL/SQL to PL/pgSQL coverage.

What Trekport translates from PL/SQL to PL/pgSQL. Items marked partial are reported by the engine with a concrete fix path before deployment.

Routines and packages

FeatureStatusNotes
Standalone procedures and functionsSupported
Function default parametersSupported
Functions with OUT parametersSupportedLowered to record-returning PL/pgSQL.
Package spec and bodySupportedLowered to schema-plus-functions with state preserved.
Pipelined functionsSupported

Triggers

FeatureStatusNotes
Row-level triggersSupported
Statement-level triggersSupported
Compound triggersSupported
INSTEAD OF triggersSupported

Cursors

FeatureStatusNotes
Explicit cursorsSupported
Implicit cursorsSupported
REF CURSOR / SYS_REFCURSORSupported

Control flow and bulk operations

FeatureStatusNotes
Named exceptions and WHEN OTHERSSupported
RAISE_APPLICATION_ERRORSupported
BULK COLLECT INTOSupported
FORALLSupported
FORALL SAVE EXCEPTIONSSupported
MERGESupported

Queries and composite types

FeatureStatusNotes
Hierarchical queries with CONNECT BYSupported
Analytic and window functionsSupported
Object types and methodsSupported
Records and associative arraysSupported

Runtime packages

Runtime packages route through the compatibility layer. The engine never emits an Oracle package call without the supporting PostgreSQL extension being installed.

FeatureStatusNotes
DBMS_OUTPUT, DBMS_LOB, DBMS_SQLSupportedThrough the compatibility layer.
UTL_FILESupportedThrough the compatibility layer.
UTL_HTTPSupportedThrough the http extension.
DBMS_SCHEDULER and DBMS_JOBSupportedThrough pg_cron.

Partial coverage

Trekport reports partial cases explicitly. The deployment report names the affected object and points at the resolution path.

FeatureStatusNotes
Autonomous transactionsPartialLimited equivalent via dblink for narrow cases. Engine reports gaps.
Database links to non-PostgreSQL targetsPartialTargeted at PostgreSQL and foreign-data-wrapper-compatible sources.
HintsPartialOracle hints carry forward as comments. Equivalent PostgreSQL plan controls applied where available.
FLASHBACK queriesPartialOut-of-scope by default. Reported with rationale.

Example: function with OUT parameters

Oracle sourceplsql
CREATE OR REPLACE FUNCTION lookup_employee(
  p_emp_id  IN  employees.employee_id%TYPE,
  p_name    OUT employees.last_name%TYPE,
  p_dept_id OUT employees.department_id%TYPE
) RETURN BOOLEAN AS
BEGIN
  SELECT last_name, department_id
    INTO p_name, p_dept_id
    FROM employees
   WHERE employee_id = p_emp_id;
  RETURN TRUE;
EXCEPTION
  WHEN NO_DATA_FOUND THEN RETURN FALSE;
END;
PostgreSQL outputplpgsql
CREATE OR REPLACE FUNCTION lookup_employee(
  p_emp_id  integer,
  OUT found boolean,
  OUT p_name text,
  OUT p_dept_id integer
) RETURNS record AS $$
BEGIN
  SELECT last_name, department_id
    INTO p_name, p_dept_id
    FROM employees
   WHERE employee_id = p_emp_id;
  found := true;
EXCEPTION
  WHEN NO_DATA_FOUND THEN found := false;
END;
$$ LANGUAGE plpgsql;

Related reading