/oracle-to-postgres-migration-expert:migrating-oracle-to-postgres-stored-proceduresfrom oracle-to-postgres-migration-expert
Migrates Oracle PL/SQL stored procedures and functions to PostgreSQL PL/pgSQL, preserving behavior, signatures, exception handling, and orafce compatibility. Useful during Oracle-to-PostgreSQL database migrations.
Ships in oracle-to-postgres-migration-expert. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Translate an Oracle procedure or function from the migration workspace into one PostgreSQL PL/pgSQL file, using Oracle DDL for source semantics and PostgreSQL DDL for target schema fidelity.
.github/oracle-to-postgres-migration/DDL/Oracle/Procedures and Functions/.".github/oracle-to-postgres-migration/DDL/Oracle/Procedures and Functions/..github/oracle-to-postgres-migration/DDL/Oracle/Tables and Views/..github/oracle-to-postgres-migration/DDL/Postgres/{ProjectName}/Tables and Views/..github/oracle-to-postgres-migration/DDL/Postgres/{ProjectName}/Procedures and Functions/{PACKAGE_NAME_IF_APPLICABLE}/.{ProjectName} as the project assembly or folder name with spaces normalized to -, for example MyApp.DataAccess.assembly/folder, PL/pgSQL**, (e.g., and . Consult the Oracle table/view definitions at .UNION ALL, and orafce choices explicitly before writing output.Procedures and Functions path, creating a package subdirectory only when the Oracle package requires {PACKAGE_NAME_IF_APPLICABLE}.| Oracle concern | PostgreSQL action |
|---|---|
| General PL/SQL syntax | Translate to PL/pgSQL equivalents while preserving functionality and control flow logic. |
| Method signature | Do not alter method signatures, parameter order, names, or modes. |
| Type-anchored input | Preserve input anchors such as PARAM_NAME IN table_name.column_name%TYPE when the target supports a faithful anchor. |
| Output parameters passed to other procedures | Use explicit types such as NUMERIC, VARCHAR, or INTEGER; do not type-anchor these outputs. |
| Object qualification | Do not prefix object names with schema names unless the Oracle source already did. |
| Exceptions and rollback | Leave exception handling and rollback logic unchanged unless PostgreSQL syntax requires a direct translation. |
| Comments and grants | Do not generate COMMENT or GRANT statements. |
| Oracle compatibility functions | Use the orafce extension when it improves clarity or preserves Oracle fidelity without hiding semantic differences. |
| Checkpoint | Rule |
|---|---|
| Binary ordering | Use COLLATE "C" only when Oracle-compatible binary ordering is required and no other sort order is specified. |
| Linguistic ordering | If Oracle used explicit linguistic sorting such as NLS_SORT = French, map to an explicit PostgreSQL locale collation rather than "C". |
| Environment discovery | Run or recommend SELECT collname, collprovider, collcollate, collctype FROM pg_collation ORDER BY collname; to discover target collations. |
UNION ALL | Treat every UNION ALL as a review checkpoint; validate plan quality per branch and restructure when combined-branch planning causes regressions such as unexpected sequential scans on large tables. |
## Stored procedure migration - <procedure or function name>
**Status:** migrated | blocked
**Source:** `.github/oracle-to-postgres-migration/DDL/Oracle/Procedures and Functions/<source file>`
**Target:** `.github/oracle-to-postgres-migration/DDL/Postgres/<ProjectName>/Procedures and Functions/<PACKAGE_NAME_IF_APPLICABLE>/<procedure>.sql`
### Translation notes
| Area | Decision | Evidence |
| --- | --- | --- |
| Signature | <preserved or blocked reason> | `<parameter list>` |
| Types | <anchors and explicit output types> | `<Oracle/PostgreSQL DDL consulted>` |
| Collation | <none, COLLATE "C", or locale collation> | `<ORDER BY or NLS_SORT evidence>` |
| orafce | <used or not used> | `<function or reason>` |
| UNION ALL | <reviewed or not present> | `<plan concern or none>` |
### Validation
- Oracle source read: <yes/no>
- PostgreSQL target DDL read: <yes/no>
- One procedure per file: <yes/no>
Procedures and Functions and all referenced table/view definitions were checked..github/oracle-to-postgres-migration/DDL/Postgres/{ProjectName}/Tables and Views/ were used for target types.NUMERIC, VARCHAR, INTEGER, or another justified PostgreSQL type.COMMENT statements, or GRANT statements were introduced.UNION ALL review checkpoint are documented.{ProjectName} and {PACKAGE_NAME_IF_APPLICABLE} correctly, with one procedure per file.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
oracle-migration, plsql, plpgsql, stored-procedures, database-migration
8 skills in this plugin
/creating-oracle-to-postgres-master-migration-planDiscover .NET solution projects, classify Oracle-to-PostgreSQL migration eligibility, detect Oracle dependencies, and write .github/oracle-to-postgres-migration/Reports/MasterMigrationPlan.md. Use when starting a multi-project Oracle-to-PostgreSQL migration, inventorying .NET projects, or assessing Oracle dependency scope./creating-oracle-to-postgres-migration-bug-reportCreate structured bug reports for Oracle-to-PostgreSQL migration defects with source-of-truth Oracle behavior, PostgreSQL divergence, severity, root cause, remediation, validation, and filename convention. Use when documenting behavioral differences, failed migration tests, or data-layer defects during an Oracle-to-PostgreSQL migration./creating-oracle-to-postgres-migration-integration-testsCreate Phase 3 Oracle integration tests for .NET data access artifacts before Oracle-to-PostgreSQL migration, capturing Oracle behavior as the golden baseline while keeping assertions portable for Phase 6. Use when the user asks to add integration tests for repositories, DAOs, stored procedure callers, query builders, seed data, or lookup constants before PostgreSQL migration begins./migrating-oracle-to-postgres-data-access-codeMigrate .NET/C# data access code from Oracle.ManagedDataAccess or Oracle.EntityFrameworkCore to PostgreSQL with Npgsql. Use when replacing OracleConnection, OracleCommand, OracleDataReader, OracleDbType mappings, stored procedure calls, connection strings, inline SQL, and EF Core provider configuration during an Oracle-to-PostgreSQL migration./planning-oracle-to-postgres-migration-integration-testingCreate an integration testing plan for one .NET project during Oracle-to-PostgreSQL migration. Use when planning coverage for repositories, DAOs, stored procedure callers, CRUD service layers, Oracle-specific behavior, seed data, or migration validation cases before writing integration tests./reviewing-oracle-to-postgres-migrationReview Oracle-to-PostgreSQL migration plans or completed artifacts for behavioral risks: empty strings, exceptions, refcursors, type coercion, sorting and collations, UNION ALL planner changes, materialized-view refresh, timestamps, sequences, ROWNUM, NVL/DECODE, and concurrent transactions. Use when planning or validating database migrations and integration tests.npx claudepluginhub gbb-acelerators/awesome-harness-primitives --plugin oracle-to-postgres-migration-expertOther plugins' skills for the same job