You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: SQL: CREATE OR REPLACE EDITIONABLE/NONEDITIONABLE PROCEDURE|FUNCTION|TRIGGER yields only a file node (0 edges) #5167
I have checked the Troubleshooting section in the README
What happened?
Oracle's default DDL form (what DBMS_METADATA.GET_DDL and most IDE exports emit) is CREATE OR REPLACE EDITIONABLE PROCEDURE ... (also NONEDITIONABLE, and for FUNCTION and TRIGGER). extract_sql returns only the file node and no edges for such a file. The identical statement without the EDITIONABLE keyword gives the routine node plus reads_from / writes_to edges.
Expected: same result with or without [NON]EDITIONABLE.
Root cause: the ERROR-node recovery regexes in graphify/extractors/sql.py allow only CREATE [OR REPLACE|ALTER] directly followed by FUNCTION|PROC[EDURE] (_ROUTINE_RECOVERY_RX, lines 35-41) or TRIGGER (_TRIGGER_RECOVERY_RX, lines 54-59), so the statement is never recovered (used at lines 945 and 966).
Steps to reproduce
mkdir demo &&cd demo
cat > t1.sql <<'SQL'CREATE OR REPLACE EDITIONABLE PROCEDURE hr.load_emp ISBEGIN INSERT INTO hr.emp_copy SELECT * FROM hr.emp;END;/SQL
sed 's/EDITIONABLE //' t1.sql > t1b.sql
python - <<'PY'from pathlib import Pathfrom graphify.extractors.sql import extract_sqlfor f in ("t1.sql", "t1b.sql"): r = extract_sql(Path(f)) print(f, [n["label"] for n in r["nodes"]], sorted({(e["relation"], e["target"]) for e in r["edges"]}))PY
Same result (file node only) for NONEDITIONABLE, for EDITIONABLE FUNCTION hr.f RETURN NUMBER IS ..., and for EDITIONABLE TRIGGER hr.trg_emp BEFORE INSERT ON hr.emp FOR EACH ROW ....
Proposed fix (verified on a local copy of sql.py)
Allow an optional (?:NON)?EDITIONABLE in both regexes:
With this patch all four variants (EDITIONABLE / NONEDITIONABLE procedure, EDITIONABLE function, EDITIONABLE trigger) produce hr.load_emp() / hr.f() / hr.trg_emp nodes with reads_from, writes_to, triggers edges, matching the non-EDITIONABLE output. A regression test (the four statements above, asserting the routine node and edges) would fail before and pass after. Happy to submit the PR.
Graphify version
0.9.104
Operating System
Linux
Python Version
3.12
Installation Method
uv tool install (recommended)
Additional context
Related: #1992 (full PL/SQL grammar, which would subsume this), #3164 (same regex, T-SQL).
Activity
github-actions commentedon Nov 12, 2026
Thanks for opening this issue, @a9385208438-dev. A maintainer will take a look soon.
If you would like to discuss it in real time, come say hi on our Discord server. For longer-form questions and ideas there is also GitHub Discussions.
To help us triage, please make sure the report includes what you expected, what actually happened, and the steps (and a small sample) to reproduce it.
fix(sql): accept Oracle [NON]EDITIONABLE in routine and trigger recov…
chore: fix the MCP reload single-flight race and fold SQL editionable…
safishamsi commentedon Nov 12, 2026
Fixed by #5183 (131d302), released in graphify 0.9.108. Thanks @a9385208438-dev for the report and @Yi-111-a for the fix.