microsoft / microsoft/vscode-pgsql
Migration shows successful when only exception stubs are generated due to missing package body in source
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 395
- Forks
- 33
- Avg merge
- 1h 46m
- Merged PRs (30d)
- 3
Description
Describe the bug
When a source Oracle package cannot be fully extracted/compiled, the conversion pipeline may generate PostgreSQL function stubs that only raise Oracle-compatible exceptions (ORA-06508 / ORA-04067). However, the migration report still marks the package as Converted with 100% success rate, which overstates migration readiness because the package implementation was not migrated.
observed on ms-ossdata.vscode-pgsql version 1.27.3
To Reproduce
Create a package where body compiles with error in the source (Oracle) and run the migration.
In PostgreSQL the migration create functions like this:
CREATE OR REPLACE FUNCTION _mig_scratch_soe."orderentry$browseproducts"
(
cust_id text,
min_sleep integer,
max_sleep integer
)
RETURNS character varying
LANGUAGE 'plpgsql'
AS $BODY$
BEGIN
-- Oracle raises ORA-04067 + ORA-06508
RAISE EXCEPTION
USING
ERRCODE = 'U6508',
MESSAGE = 'ORA-06508: PL/SQL: could not find program unit being called: ORDERENTRY.BROWSEPRODUCTS',
DETAIL = 'ORA-04067: not executed, package body does not exist';
END;
$BODY$;
And the report shows:
Package Objects
Object Type Extracted Converted Merged Fallback Failed Skipped Success Rate
PACKAGE 1 1 0 0 0 0 100.0%
Total Package
Additionally, when fixing the source (either remove the package because it is not used, or fix it) we cannot re-run the migration:
Expected behavior
I would expect at least a warning when the generated PostgreSQL routine contains a stub with error, not an all-green 100% success in the report, and a review task, with the possibility to re-run when the root cause has been fixed.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the migration conversion pipeline, generated PostgreSQL routine stubs, and the migration report for packages whose source body fails to compile. Check how the report counts exception-only stubs and how migration state prevents a rerun. Done means incomplete packages are visibly flagged with a warning or review task, the success rate is not overstated, and rerunning is possible after the source is fixed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, sql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100