Commit 1ba30c8
committed
fix: strip RETURNING from translated optimized_sql, not from original_sql plan
_prepare_sql step 5: plan.stripped_sql was built from original_sql (untranslated),
so using it to overwrite optimized_sql discarded the entire normalization pipeline.
optimized_sql still had DEFAULT, $1 params, unquoted schema names etc. → SQLCODE -12.
Fix: when original_sql is provided, call ReturningPlan._strip_clauses() on
optimized_sql directly using plan.returning_clause and plan.on_conflict_clause
(metadata from original_sql, stripping applied to translated form).
Bumps version to 1.5.7.1 parent 2786891 commit 1ba30c8
3 files changed
+18
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
10 | 15 | | |
11 | 16 | | |
12 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
696 | 696 | | |
697 | 697 | | |
698 | 698 | | |
699 | | - | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
700 | 711 | | |
701 | 712 | | |
702 | 713 | | |
| |||
0 commit comments