migrating-oracle-to-postgres-stored-procedures
github/awesome-copilot
Migrate Oracle PL/SQL stored procedures to PostgreSQL PL/pgSQL with syntax translation and Oracle-compatible collation.
What is migrating-oracle-to-postgres-stored-procedures?
Translates Oracle PL/SQL stored procedures and functions to PostgreSQL PL/pgSQL equivalents during database migration. Handles Oracle-specific syntax, preserves type-anchored parameters, applies COLLATE "C" for text sorting compatibility, and leverages the orafce extension where appropriate.
- Translates Oracle PL/SQL syntax to PostgreSQL PL/pgSQL equivalents
- Preserves original method signatures and type-anchored input parameters
- Applies COLLATE "C" for Oracle-compatible text field sorting
- Leverages orafce extension for improved clarity and fidelity
- Maintains exception handling and rollback logic from source procedures
- Resolves types using Oracle and PostgreSQL table/view definitions
How to install migrating-oracle-to-postgres-stored-procedures
npx skills add https://github.com/github/awesome-copilot --skill migrating-oracle-to-postgres-stored-procedures- Access to Oracle source procedure files in `.github/oracle-to-postgres-migration/DDL/Oracle/Procedures and Functions/`
- Oracle table/view definitions available at `.github/oracle-to-postgres-migration/DDL/Oracle/Tables and Views/`
- PostgreSQL target schema definitions at `.github/oracle-to-postgres-migration/DDL/Postgres/Tables and Views/`
- orafce extension installed in target PostgreSQL database (optional but recommended)
How to use migrating-oracle-to-postgres-stored-procedures
- 1.Read the Oracle stored procedure from the Oracle source directory, consulting table/view definitions for type resolution
- 2.Apply translation rules: convert Oracle syntax to PL/pgSQL, preserve signatures and type-anchored input parameters, use explicit types for output parameters, apply COLLATE "C" for text ordering, and leverage orafce where beneficial
- 3.Write the migrated procedure to `.github/oracle-to-postgres-migration/DDL/Postgres/Procedures and Functions/{PACKAGE_NAME_IF_APPLICABLE}/` with one procedure per file
Use cases
- Converting Oracle stored procedures to PostgreSQL during full database migration
- Translating Oracle functions with type-anchored parameters to PL/pgSQL equivalents
- Ensuring Oracle-compatible text sorting behavior in PostgreSQL procedures
- Migrating packages of related procedures while preserving their organization
- Handling complex control flow and exception logic in legacy Oracle procedures
- Database migration engineers
- Oracle-to-PostgreSQL conversion teams
- DBAs managing legacy system transitions
- Backend developers maintaining migrated codebases
migrating-oracle-to-postgres-stored-procedures FAQ
No. Use explicit types (NUMERIC, VARCHAR, INTEGER) for output parameters. Only type-anchor input parameters using the %TYPE syntax.
Apply COLLATE "C" when ordering by text fields to maintain Oracle-compatible sorting behavior in PostgreSQL.
No, unless they were already present in the original Oracle source. Do not add new schema prefixes during migration.
No. Focus only on the procedure logic translation. Do not generate COMMENT or GRANT statements.
Leverage orafce when it improves clarity or fidelity of the migration, such as for Oracle-specific functions that have direct orafce equivalents.
Full instructions (SKILL.md)
Source of truth, from github/awesome-copilot.
name: migrating-oracle-to-postgres-stored-procedures description: 'Migrates Oracle PL/SQL stored procedures to PostgreSQL PL/pgSQL. Translates Oracle-specific syntax, preserves method signatures and type-anchored parameters, leverages orafce where appropriate, and applies COLLATE "C" for Oracle-compatible text sorting. Use when converting Oracle stored procedures or functions to PostgreSQL equivalents during a database migration.'
Migrating Stored Procedures from Oracle to PostgreSQL
Translate Oracle PL/SQL stored procedures and functions to PostgreSQL PL/pgSQL equivalents.
Workflow
Progress:
- [ ] Step 1: Read the Oracle source procedure
- [ ] Step 2: Translate to PostgreSQL PL/pgSQL
- [ ] Step 3: Write the migrated procedure to Postgres output directory
Step 1: Read the Oracle source procedure
Read the Oracle stored procedure from .github/oracle-to-postgres-migration/DDL/Oracle/Procedures and Functions/. Consult the Oracle table/view definitions at .github/oracle-to-postgres-migration/DDL/Oracle/Tables and Views/ for type resolution.
Step 2: Translate to PostgreSQL PL/pgSQL
Apply these translation rules:
- Translate all Oracle-specific syntax to PostgreSQL equivalents.
- Preserve original functionality and control flow logic.
- Keep type-anchored input parameters (e.g.,
PARAM_NAME IN table_name.column_name%TYPE). - Use explicit types (
NUMERIC,VARCHAR,INTEGER) for output parameters passed to other procedures — do not type-anchor these. - Do not alter method signatures.
- Do not prefix object names with schema names unless already present in the Oracle source.
- Leave exception handling and rollback logic unchanged.
- Do not generate
COMMENTorGRANTstatements. - Use
COLLATE "C"when ordering by text fields for Oracle-compatible sorting. - Leverage the
orafceextension when it improves clarity or fidelity.
Consult the PostgreSQL table/view definitions at .github/oracle-to-postgres-migration/DDL/Postgres/Tables and Views/ for target schema details.
Step 3: Write the migrated procedure to Postgres output directory
Place each migrated procedure in its own file under .github/oracle-to-postgres-migration/DDL/Postgres/Procedures and Functions/{PACKAGE_NAME_IF_APPLICABLE}/. One procedure per file.
Related skills
More from github/awesome-copilot and the wider catalog.

mkdocs-translations
Automatically translate a full MkDocs docs site into a new language, preserving structure and updating i18n config.

model-recommendation
Analyze agent/prompt files and recommend optimal AI models based on task complexity, capabilities, and cost-efficiency.

msstore-cli
CLI for publishing and managing Windows applications in the Microsoft Store with Partner Center integration.

multi-stage-dockerfile
Create optimized multi-stage Dockerfiles that reduce image size and improve security across any language or framework.

my-issues
List and prioritize your assigned issues in the current GitHub repository.

my-pull-requests
List your pull requests in the current repository with status and review details.