{"kind":"Skill","metadata":{"namespace":"community","name":"migrating-oracle-to-postgres-stored-procedures","version":"0.1.0"},"spec":{"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.","files":{"SKILL.md":"---\nname: migrating-oracle-to-postgres-stored-procedures\ndescription: '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.'\n---\n\n# Migrating Stored Procedures from Oracle to PostgreSQL\n\nTranslate Oracle PL/SQL stored procedures and functions to PostgreSQL PL/pgSQL equivalents.\n\n## Workflow\n\n```\nProgress:\n- [ ] Step 1: Read the Oracle source procedure\n- [ ] Step 2: Translate to PostgreSQL PL/pgSQL\n- [ ] Step 3: Write the migrated procedure to Postgres output directory\n```\n\n**Step 1: Read the Oracle source procedure**\n\nRead 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.\n\n**Step 2: Translate to PostgreSQL PL/pgSQL**\n\nApply these translation rules:\n\n- Translate all Oracle-specific syntax to PostgreSQL equivalents.\n- Preserve original functionality and control flow logic.\n- Keep type-anchored input parameters (e.g., `PARAM_NAME IN table_name.column_name%TYPE`).\n- Use explicit types (`NUMERIC`, `VARCHAR`, `INTEGER`) for output parameters passed to other procedures — do not type-anchor these.\n- Do not alter method signatures.\n- Do not prefix object names with schema names unless already present in the Oracle source.\n- Leave exception handling and rollback logic unchanged.\n- Do not generate `COMMENT` or `GRANT` statements.\n- Use `COLLATE \"C\"` when ordering by text fields for Oracle-compatible sorting.\n- Leverage the `orafce` extension when it improves clarity or fidelity.\n\nConsult the PostgreSQL table/view definitions at `.github/oracle-to-postgres-migration/DDL/Postgres/Tables and Views/` for target schema details.\n\n**Step 3: Write the migrated procedure to Postgres output directory**\n\nPlace 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.\n"},"import":{"commit_sha":"541b7819d8c3545c6df122491af4fa1eae415779","imported_at":"2026-05-18T20:05:35Z","license_text":"MIT License\n\nCopyright GitHub, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.","owner":"github","repo":"github/awesome-copilot","source_url":"https://github.com/github/awesome-copilot/tree/541b7819d8c3545c6df122491af4fa1eae415779/plugins/oracle-to-postgres-migration-expert/skills/migrating-oracle-to-postgres-stored-procedures"}},"content_hash":[163,86,202,86,191,150,219,205,253,58,20,171,148,154,189,49,109,84,222,255,45,62,101,151,70,226,72,115,77,182,99,251],"trust_level":"unsigned","yanked":false}
