Commit 61d2053
committed
fix: allow ROWNUM/ROWID as PL/iSQL variable names
In PL/iSQL's pre-columnref hook, check if ROWNUM or ROWID identifiers
resolve to declared variables. This prevents the SQL parser from
converting them to pseudocolumn references, matching Oracle behavior
where these can be used as variable/parameter names in PL/SQL.
The fix adds special handling in plisql_pre_column_ref() to check
ROWNUM/ROWID names even when resolve_option is not PLISQL_RESOLVE_VARIABLE,
since the SQL parser would otherwise intercept them first.1 parent 42cb0d3 commit 61d2053
3 files changed
Lines changed: 31 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1830 | 1830 | | |
1831 | 1831 | | |
1832 | 1832 | | |
1833 | | - | |
1834 | | - | |
1835 | | - | |
1836 | 1833 | | |
1837 | 1834 | | |
1838 | | - | |
1839 | 1835 | | |
1840 | 1836 | | |
1841 | 1837 | | |
| |||
1844 | 1840 | | |
1845 | 1841 | | |
1846 | 1842 | | |
1847 | | - | |
1848 | 1843 | | |
1849 | 1844 | | |
1850 | 1845 | | |
| |||
1853 | 1848 | | |
1854 | 1849 | | |
1855 | 1850 | | |
1856 | | - | |
| 1851 | + | |
1857 | 1852 | | |
1858 | 1853 | | |
1859 | 1854 | | |
1860 | | - | |
1861 | 1855 | | |
1862 | 1856 | | |
1863 | 1857 | | |
1864 | 1858 | | |
1865 | 1859 | | |
1866 | 1860 | | |
1867 | 1861 | | |
1868 | | - | |
| 1862 | + | |
1869 | 1863 | | |
1870 | 1864 | | |
1871 | 1865 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1462 | 1462 | | |
1463 | 1463 | | |
1464 | 1464 | | |
1465 | | - | |
1466 | | - | |
1467 | | - | |
1468 | 1465 | | |
1469 | 1466 | | |
1470 | 1467 | | |
1471 | | - | |
1472 | 1468 | | |
1473 | 1469 | | |
1474 | 1470 | | |
| |||
1478 | 1474 | | |
1479 | 1475 | | |
1480 | 1476 | | |
1481 | | - | |
1482 | 1477 | | |
1483 | 1478 | | |
1484 | 1479 | | |
| |||
1490 | 1485 | | |
1491 | 1486 | | |
1492 | 1487 | | |
1493 | | - | |
1494 | 1488 | | |
1495 | 1489 | | |
1496 | 1490 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
1610 | 1611 | | |
1611 | 1612 | | |
1612 | 1613 | | |
1613 | | - | |
1614 | | - | |
| 1614 | + | |
| 1615 | + | |
| 1616 | + | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
1615 | 1642 | | |
1616 | 1643 | | |
1617 | 1644 | | |
| |||
0 commit comments