LogoAwesome Skills
  • Search
  • Category
  • Tag
  • Blog
LogoAwesome Skills
LogoAwesome Skills

Discover Open-Source Agent Skills for AI Coding Assistants

Product

  • Search
  • Category
  • Tag
  • Blog

Resources

  • Claude Skill Docs
  • Antigravity Skills Docs

Tools

  • Claude Code
  • OpenCode
  • Cursor
  • Codex
  • Antigravity

Company

  • Privacy Policy
  • Terms of Service
  • Sitemap

©2026 Awesome Skills. All rights reserved.

Privacy PolicyTerms
Back to Skills

migrating-oracle-to-postgres-stored-procedures

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.

37,156stars4,659forksUpdated 7/29/2026
Database Management#sql#plpgsql#postgresql#oracle#database-migration

Security Assessment

Safe(95/100)
Security Score95/100

About migrating-oracle-to-postgres-stored-procedures

This skill guides the translation of Oracle PL/SQL stored procedures and functions into their PostgreSQL PL/pgSQL equivalents during a database migration. It solves a well-known pain point in Oracle-to-Postgres migrations: the two databases share SQL heritage but diverge sharply in procedural syntax, type anchoring, collation behavior, and built-in functions, so a naive copy-paste rarely compiles or preserves behavior. The skill provides a disciplined, rule-driven conversion process that keeps functionality and control flow intact while adapting Oracle-specific constructs to Postgres.

The workflow is a three-step loop: read the Oracle source procedure (consulting Oracle table and view DDL for type resolution), translate it applying a fixed set of rules, then write each migrated procedure to its own file in a Postgres output directory. The rules preserve type-anchored input parameters (`%TYPE`), require explicit types for output parameters passed to other procedures, leave method signatures and exception/rollback logic unchanged, and forbid generating COMMENT or GRANT statements or adding schema prefixes. It handles collation deliberately (using `COLLATE "C"` only for binary ordering and mapping Oracle linguistic sorts such as `NLS_SORT` to explicit Postgres locale collations), treats `UNION ALL` as a plan-quality review checkpoint, and leverages the `orafce` compatibility extension where it improves fidelity.

It targets database engineers, DBAs, and migration teams moving Oracle workloads to PostgreSQL who need consistent, reviewable procedure conversions rather than ad-hoc rewrites. The skill is a single SKILL.md guide that assumes a specific migration directory layout under `.github/oracle-to-postgres-migration/`.

FAQ

What does this skill actually convert?

It translates Oracle PL/SQL stored procedures and functions into PostgreSQL PL/pgSQL, preserving original functionality, control flow, exception handling, and method signatures while adapting Oracle-specific syntax.

Where does it read from and write to?

It reads Oracle procedures from `.github/oracle-to-postgres-migration/DDL/Oracle/Procedures and Functions/` and consults Oracle and Postgres table/view DDL for type resolution, then writes one migrated procedure per file under the Postgres `Procedures and Functions/` output directory.

How does it handle text ordering and collation differences?

It applies collation intentionally: `COLLATE "C"` only when Oracle-compatible binary ordering is required, and explicit Postgres locale collations when Oracle used linguistic sorting such as NLS_SORT. It suggests querying pg_collation to discover available collations in the target.

Are there things it deliberately will not generate?

Yes. It does not emit COMMENT or GRANT statements, does not alter method signatures, and does not prefix object names with schema names unless they were already present in the Oracle source.

Does it require any Postgres extensions?

It leverages the orafce extension where that improves clarity or fidelity to Oracle behavior, but orafce is used opportunistically rather than being strictly mandatory for every procedure.

Install migrating-oracle-to-postgres-stored-procedures

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill

Repository

github/awesome-copilot

Related Skills

parallel-web

45,195

create-blazor-project

5,423

od-contribute

96,513

redesign-existing-projects

96,513