본문으로 건너뛰기
Skillpedia
API 및 서버 (백엔드)40k · #7295

migrating-oracle-to-postgres-stored-procedures

하는 일

이 도구는 Oracle 데이터베이스의 저장 프로시저('stored procedures')를 PostgreSQL 데이터베이스용으로 바꾸도록 돕습니다. Oracle 전용 언어와 규칙을 PostgreSQL에서도 작동하도록 변환합니다.

사용하는 경우

  • ✓Oracle에서 PostgreSQL로 시스템을 옮길 때.
  • ✓오래된 프로시저를 새 데이터베이스용으로 다시 작성해야 할 때.
  • ✓데이터베이스를 바꾼 뒤에도 코드의 로직이 올바르게 작동하는지 확인할 때.

스킬 링크

https://github.com/github/awesome-copilot/blob/main/skills/migrating-oracle-to-postgres-stored-procedures/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/github/awesome-copilot/blob/main/skills/migrating-oracle-to-postgres-stored-procedures/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“이 Oracle 프로시저를 PostgreSQL로 바꿔 주세요: [여기에 프로시저 코드를 붙여 넣으세요]”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

도구는 원래 Oracle 코드를 읽고, 언어와 구조를 PostgreSQL 형식으로 바꾸는 규칙을 적용한 뒤 새 코드를 파일로 저장합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

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.

자주 묻는 질문

'저장 프로시저'는 무엇인가요?

데이터베이스 안에 저장되어 호출될 때 실행되는 데이터베이스 명령의 묶음입니다. 작은 데이터베이스 '함수'와 같습니다.

코드를 왜 변환해야 하나요?

Oracle과 PostgreSQL은 각각 고유한 언어와 규칙이 있습니다. 한쪽용으로 작성한 코드는 다른 쪽에서 바로 작동하지 않습니다.

도구가 모든 것을 그대로 복사하나요?

원래 기능과 코드 구조를 유지하려고 노력하지만, 데이터 형식과 텍스트 정렬 규칙처럼 PostgreSQL에 맞게 필요한 부분은 조정합니다.

상세 정보

작성자의 원본 설명

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 da

repo: github/awesome-copilot

인기도

GitHub 스타
40k
순위
#7295
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬