Security review

No findings observed

No concerns were reported in the reviewed catalog files. This is not a safety guarantee.

1 of 1 catalog files reviewed · (UTC)

Review details

AI instruction review via GitHub Agentic Workflows. Reviews inspect a recorded catalog snapshot; they do not execute skill files. AI can miss risks or report false positives.

Coverage is limited to catalog files. External links and upstream files absent from the catalog were not inspected.

Model
copilot/gpt-5.1-codex-mini
Rubric
1.0.0
Catalog commit
604d8c7ab66e2117b860e7b025dedb7d8bb0caf0
Content hash
62a740ce2610f2df49a9ae82a8d94970dbcb052f98326feef62c2290015f0bab
Reviewed files (1)
  • SKILL.md
View full report (JSON)

Usage example

A PL/SQL invoice-total procedure must retain its interface after a PostgreSQL migration.

Try a prompt like this

Convert the supplied Oracle PL/SQL invoice-total procedure to PostgreSQL PL/pgSQL. Preserve its parameter contract and null behavior, identify Oracle-specific constructs, and explain any orafce dependency or collation choice. Include fixture-based comparison cases without claiming semantic equivalence before testing.

Illustrative request, not an executed example or a guarantee of activation or results. Adapt it to your task after reviewing the skill’s instructions, prerequisites, and security review. Tool access and permissions depend on your setup.

Installation

Install as Agent Plugin Recommended
copilot plugin marketplace add samueltauil/skills-hub
copilot plugin install migrating-oracle-to-postgres-stored-procedures@skills-hub

Works with GitHub Copilot CLI and VS Code (enable chat.plugins.enabled). Plugin migrating-oracle-to-postgres-stored-procedures v1.0.0 follows the Agent Plugins spec.

Install with the gh extension
gh skills-hub install migrating-oracle-to-postgres-stored-procedures

Don't have the extension? Run gh extension install samueltauil/skills-hub first.

Download and extract to your repository:

.github/skills/migrating-oracle-to-postgres-stored-procedures/

Extract the ZIP to .github/skills/ in your repo. The folder name must match migrating-oracle-to-postgres-stored-procedures for Copilot to auto-discover it.

Skill Files (1)

SKILL.md 3.1 KB
---
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 explicit collation mapping (`COLLATE "C"` only when appropriate, locale collations when required). 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 `COMMENT` or `GRANT` statements.
- Apply collation intentionally when ordering text:
  - Use `COLLATE "C"` only when Oracle-compatible binary ordering is required and no other sort order is specified.
  - If Oracle used explicit linguistic sorting (for example `NLS_SORT = French`), map to an explicit PostgreSQL locale collation instead of `"C"`.
  - Use `SELECT collname, collprovider, collcollate, collctype FROM pg_collation ORDER BY collname;` to discover collations in the target environment.
- Treat `UNION ALL` as a review checkpoint. Validate plan quality per branch and restructure if combined-branch planning causes regressions (for example, unexpected sequential scans on large tables).
- Leverage the `orafce` extension when it improves clarity or fidelity.

Consult the PostgreSQL table/view definitions at `.github/oracle-to-postgres-migration/DDL/Postgres/{ProjectName}/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/{ProjectName}/Procedures and Functions/{PACKAGE_NAME_IF_APPLICABLE}/`. One procedure per file.

> `{ProjectName}` is the project's assembly/folder name with spaces normalized to `-` (e.g. `MyApp.DataAccess`). This matches the path used by the agent and other migration skills.

License (MIT)

View full license text
MIT License

Copyright GitHub, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.