Skip to content

support function and procedure in WITH clause#1322

Open
bigplaice wants to merge 3 commits intoIvorySQL:masterfrom
bigplaice:with_func_proc
Open

support function and procedure in WITH clause#1322
bigplaice wants to merge 3 commits intoIvorySQL:masterfrom
bigplaice:with_func_proc

Conversation

@bigplaice
Copy link
Copy Markdown
Collaborator

@bigplaice bigplaice commented May 7, 2026

fix #1067

Summary by CodeRabbit

  • New Features

    • Oracle-style WITH FUNCTION/PROCEDURE: inline functions/procedures inside queries with IN/IN OUT params, defaults, recursion, and exception handling.
    • EXPLAIN displays WITH-function signatures and, in verbose mode, their bodies.
  • Behavior Changes

    • WITH functions are limited to scalar-expression contexts and are rejected when used as table/set-returning functions.
  • Tests

    • Added comprehensive regression tests covering success cases, error cases, and EXPLAIN output.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 7, 2026

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0270afef-44ee-417f-816d-f5199b80585a

📥 Commits

Reviewing files that changed from the base of the PR and between 79fec0b and 86fdbf6.

📒 Files selected for processing (2)
  • src/backend/parser/parse_merge.c
  • src/include/nodes/parsenodes.h
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/include/nodes/parsenodes.h

📝 Walkthrough

Walkthrough

Implements Oracle-compatible WITH FUNCTION/PROCEDURE: grammar and lexer support, parse-time registration and lookup (overloads/defaults), propagation into Query/PlannedStmt, executor initialization and SRF/composite guards, PL/iSQL lazy compilation/runtime dispatch, EXPLAIN emission of signatures/bodies, build updates, and regression tests.

Changes

WITH Clause Inline Functions and Procedures

Layer / File(s) Summary
Type Definitions and Data Contracts
src/include/nodes/parsenodes.h, src/include/oracle_parser/ora_with_function.h, src/include/nodes/execnodes.h, src/include/parser/parse_node.h
New InlineFunctionDef, WithFuncEntry, WithFuncContainer and fields (Query.withFuncDefs, WithClause.plsql_defs, ParseState.p_with_func_list, EState.es_with_func_container).
Function-Source Discriminator
src/include/nodes/primnodes.h
Added FUNC_FROM_WITH_CLAUSE ('w') and updated FUNC_EXPR_FROM_PG_PROC to exclude WITH-origin functions.
Grammar Extension
src/backend/oracle_parser/ora_gram.y
Bison rules for plsql_declarations/plsql_declaration added and precedence adjusted to disambiguate DML after PLSQL defs.
Parser Build & Includes
src/backend/parser/Makefile, src/backend/parser/meson.build, various parser sources
Added parse_with_plsql.c to parser build and updated includes to reference ora_with_function.h.
Parse-Time Registration & Lookup
src/backend/parser/parse_with_plsql.c, src/backend/parser/parse_cte.c
transformWithFuncDefs registers inline definitions (types, defaults, duplicates) and installs withFuncLookupHook, which resolves call-sites, selects overloads, and appends analyzed defaults.
Function Call Resolution
src/backend/parser/parse_func.c, src/backend/parser/parse_clause.c
ParseFuncOrColumn marks WITH-origin calls, searches ancestor ParseState for WITH hooks, and synchronizes argument types when defaults are appended; OUT-parameter checks skip WITH functions.
Query Transformation Propagation
src/backend/parser/analyze.c, contrib/ivorysql_ora/src/merge/ora_merge.c, src/backend/parser/parse_merge.c
SELECT, INSERT, DELETE, UPDATE, VALUES, set-operations, MERGE transforms copy withClause->plsql_defs into Query->withFuncDefs.
Planner Integration & EXPLAIN
src/backend/optimizer/plan/planner.c, src/backend/commands/explain.c
standard_planner() copies withFuncDefs into PlannedStmt; ExplainPrintWithFunctions added and invoked to print inline subprogram signatures and, when verbose, body text.
Executor Initialization
src/backend/executor/execExpr.c
ExecInitFunc recognizes FUNC_FROM_WITH_CLAUSE, initializes fmgr subproc context via fmgr_subproc_info_cxt, and injects appropriate outer EState into flinfo->fn_extra; ExecInitFuncWithOutParams short-circuits for WITH functions.
Executor Usage Restrictions
src/backend/executor/execSRF.c, src/backend/executor/execTuples.c, src/backend/utils/fmgr/funcapi.c
SRF/table-function initialization and internal function result-type inspection reject WITH-clause functions with FEATURE_NOT_SUPPORTED, preventing composite/SRF usage.
PL/iSQL Inline Compilation
src/pl/plisql/src/pl_comp.c, src/pl/plisql/src/plisql.h
plisql_compile_inline signature extended with initial_rettype and initial_is_proc; compiled inline metadata derived from inputs; parser setup exposes p_with_func_list when compiling WITH inline functions.
PL/iSQL Execution Pipeline
src/pl/plisql/src/pl_handler.c
Lazy compilation and caching of WITH functions into a WithFuncContainer, return-type/prokind fixup after compile, plisql_get_with_func() runtime lookup, and save/restore semantics for active WITH-resolution globals.
EXPLAIN Output
src/backend/commands/explain.c
Helper prints WITH FUNCTION/PROCEDURE signatures (params, modes, types, return) and, when verbose, the function body source in EXPLAIN output.
Lexer Semicolon Handling
src/oracle_fe_utils/ora_psqlscan.l
Semicolon and identifier rules adjusted to avoid premature termination inside PLSQL WITH bodies and to support EXPLAIN-WITH special-case.
Build Configuration
src/backend/parser/Makefile, src/backend/parser/meson.build
Parser build files updated to include parse_with_plsql.c / parse_with_plsql.o.
Regression Tests
src/oracle_test/regress/sql/with_function.sql, src/oracle_test/regress/expected/with_function*.out, src/oracle_test/regress/parallel_schedule
Comprehensive tests covering scalar/procedure cases, defaults/IN OUT, control-flow, recursion, DML embedding, error cases (duplicates, wrong types, unsupported usage), and EXPLAIN/VERBOSE checks.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Possibly related PRs

Suggested reviewers

  • OreoYang
  • jiaoshuntian
  • NotHimmel

"🐰 I stitched inline functions in WITH so neat,
From parse to plan, their journey's complete,
Lexer, EXPLAIN, PLiSQL all in tow—
This rabbit hops proudly — the feature will show! 🥕"

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'support function and procedure in WITH clause' clearly and specifically describes the main change—adding support for declaring functions and procedures in the WITH clause.
Linked Issues check ✅ Passed The code changes comprehensively implement the linked issue #1067 requirement to support function and procedure declarations in the WITH clause, including grammar, parser, executor, and optimizer support.
Out of Scope Changes check ✅ Passed All changes are directly related to implementing WITH clause function/procedure support; no out-of-scope modifications were detected in the changeset.
Docstring Coverage ✅ Passed Docstring coverage is 81.08% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 OpenGrep (1.20.0)

OpenGrep fatal error (exit code 2): [00.14][ERROR]: Error: exception Unix_error: No such file or directory stat src/include/nodes/parsenodes.h
Raised by primitive operation at UTmp.replace_named_pipe_by_regular_file_if_needed in file "libs/commons/UTmp.ml", line 145, characters 8-27
Called from Scan_CLI.replace_target_roots_by_regular_files_where_needed.(fun) in file "src/osemgrep/cli_scan/Scan_CLI.ml", lines 1086-1087, characters 19-65
Called from List_.fast_map in file "libs/commons/List_.ml", line 81, characters 17-20
Called fr


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/backend/parser/analyze.c (1)

380-382: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

withFuncDefs is not propagated for MERGE statements.

The default transformMergeStmt implementation in src/backend/parser/parse_merge.c (lines 124–132) calls transformWithClause and sets qry->hasModifyingCTE, but omits the assignment qry->withFuncDefs = stmt->withClause->plsql_defs. All other DML transformers (INSERT, UPDATE, DELETE, VALUES, set-ops) perform this assignment. Without it, WITH FUNCTION … MERGE … will silently discard inline function definitions. The Oracle hook implementation correctly includes this assignment (see contrib/ivorysql_ora/src/merge/ora_merge.c line 701), indicating it should be in the standard implementation as well.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/backend/parser/analyze.c` around lines 380 - 382, The MERGE transformer
is not propagating WITH FUNCTION definitions: update the default
transformMergeStmt implementation to call transformWithClause (as it already
does) and then assign qry->withFuncDefs = stmt->withClause->plsql_defs (and
preserve existing qry->hasModifyingCTE behavior) so that inline function defs
from stmt->withClause are propagated into the resulting Query; modify
transformMergeStmt to mirror the withFuncDefs assignment used by other DML
transformers (and by the Oracle hook implementation) to ensure WITH FUNCTION …
MERGE … retains the definitions.
src/include/nodes/parsenodes.h (1)

1662-1663: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update the WithClause propagation comment to match current behavior.

The comment says WithClause does not propagate into Query, but Query.withFuncDefs now carries data derived from it. This is misleading for future maintainers.

Also applies to: 1668-1668

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/include/nodes/parsenodes.h` around lines 1662 - 1663, The existing
comment claiming "WithClause does not propagate into the Query" is outdated;
change the comment(s) around WithClause (both occurrences) to state that
WithClause-derived information is now carried into Query via Query.withFuncDefs
(and that CommonTableExpr still propagates as before), so future readers
understand that Query.withFuncDefs holds data derived from WithClause.
🧹 Nitpick comments (5)
src/backend/executor/execSRF.c (1)

156-157: 💤 Low value

Silent skip at line 157 is consistent with the init_sexpr error barrier — but consider an explicit Assert.

The funcexpr->function_from != FUNC_FROM_WITH_CLAUSE guard prevents subproc_should_change_return_type from being called on a WITH-clause function. In practice this code path is unreachable because init_sexpr (called earlier, during ExecInitTableFunctionResult) would have already raised an error. The current behaviour — silently falling through to the outer funcrettype = exprType(...) — is harmless given that guarantee.

However, adding Assert(funcexpr->function_from != FUNC_FROM_WITH_CLAUSE) immediately before line 158 would make the invariant explicit and catch any future regression during development.

🛡️ Optional: make the invariant explicit
  else if (!FUNC_EXPR_FROM_PG_PROC(funcexpr->function_from) &&
+          /* WITH-clause functions must have been rejected by init_sexpr already */
+          Assert(funcexpr->function_from != FUNC_FROM_WITH_CLAUSE),
           funcexpr->function_from != FUNC_FROM_WITH_CLAUSE &&
           subproc_should_change_return_type(funcexpr,
                                             &resulttype,
                                             &chtypmod,
                                             &chcollationoid))

(Alternatively, a standalone Assert statement placed before the else if would read more clearly.)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/backend/executor/execSRF.c` around lines 156 - 157, Add an explicit
Assert to document the invariant that a WITH-clause function cannot reach this
branch: before the else-if that checks funcexpr->function_from (the block that
currently skips calling subproc_should_change_return_type and falls back to
computing funcrettype via exprType), insert Assert(funcexpr->function_from !=
FUNC_FROM_WITH_CLAUSE). This makes the guarantee from init_sexpr (invoked during
ExecInitTableFunctionResult) explicit and will catch regressions where a
WITH-clause function could reach this code path.
src/oracle_test/regress/sql/with_function.sql (2)

22-28: ⚡ Quick win

Add a sibling-call case from inside a WITH subprogram body.

Current coverage proves top-level composition and self-recursion, but not the new path where one inline subprogram resolves a sibling WITH function/procedure from inside its own body. That is the exact scope-propagation path added in this PR, so it should have a regression. As per coding guidelines, **/sql/*.sql: Test SQL files. Ensure comprehensive coverage of features.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/oracle_test/regress/sql/with_function.sql` around lines 22 - 28, Add a
new test in the WITH-function regression file that exercises a sibling-call from
inside a WITH subprogram body: create two WITH FUNCTIONS (e.g., add1 and mul2 as
in the diff) but modify one function body so it calls its sibling (for example,
have mul2 call add1 internally or vice versa) and then SELECT the top-level call
to exercise the new scope propagation path; ensure the test lives alongside the
existing WITH FUNCTION examples in src/oracle_test/regress/sql/with_function.sql
and uses the same function names (add1, mul2) so the test covers resolving a
sibling WITH function from inside a subprogram body.

8-13: ⚡ Quick win

Add a regression that actually invokes a WITH PROCEDURE.

This only proves the declaration parses. It never exercises the procedure execution path, argument binding, or side effects, so a break in the new runtime support could still pass this file. As per coding guidelines, **/sql/*.sql: Test SQL files. Ensure comprehensive coverage of features.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/oracle_test/regress/sql/with_function.sql` around lines 8 - 13, The file
only declares the WITH PROCEDURE do_nothing without invoking it; update the test
to actually execute the procedure (e.g., add a CALL do_nothing; or a BEGIN
do_nothing; END; block) and then assert a side-effect or result (keep the
existing SELECT 'procedure ok' AS result or replace with a SELECT that verifies
the side-effect) so the runtime execution, argument binding and side-effect path
for the WITH PROCEDURE named do_nothing is exercised.
src/oracle_test/regress/expected/with_function.out (2)

11-20: ⚡ Quick win

T02 does not validate actual WITH PROCEDURE invocation.

This case currently proves parsing/acceptance, but not procedure execution semantics. Please add one case that invokes the procedure (directly or via a WITH function wrapper) and asserts an observable effect.

As per coding guidelines, **/expected/*.out files must cover Oracle-compatibility behavior and edge-case coverage, and the referenced contract requires side-effect/void-style WITH PROCEDURE semantics.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/oracle_test/regress/expected/with_function.out` around lines 11 - 20, The
test defines WITH PROCEDURE do_nothing but never invokes it; update the test to
actually call the procedure and assert a side-effect-observable result by adding
a WITH-function wrapper that invokes do_nothing and returns a marker (e.g., a
function call_wrapper that calls do_nothing then returns 'procedure ok'), then
SELECT the wrapper result so the output verifies execution semantics of WITH
PROCEDURE (reference symbols: WITH PROCEDURE do_nothing and the new wrapper
function name you add).

351-363: ⚡ Quick win

Add EXPLAIN VERBOSE coverage for WITH PROCEDURE body text.

You already verify function body rendering in VERBOSE mode; add the equivalent procedure-body assertion to lock that part of the EXPLAIN contract too.

As per coding guidelines, **/expected/*.out files must ensure edge-case coverage, and the referenced contract requires EXPLAIN output coverage for WITH Function/Procedure definitions.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/oracle_test/regress/expected/with_function.out` around lines 351 - 363,
Add a second EXPLAIN VERBOSE case mirroring the existing FUNCTION block: after
the EXPLAIN (COSTS OFF, VERBOSE) test that exercises WITH FUNCTION shows_body,
add an analogous EXPLAIN that defines a WITH PROCEDURE (e.g., WITH PROCEDURE
shows_proc(...) IS ... END;) and selects/calls it so the verbose output includes
a "WITH Procedure: shows_proc" line and a "Body: ..." line; update the expected
output block to assert those Procedure lines just like the Function ones so
EXPLAIN VERBOSE covers WITH PROCEDURE body text.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/backend/parser/parse_cte.c`:
- Around line 129-132: The errhint currently references the C enum constant
ORA_PARSER which users cannot type; update the errhint in the ereport call (the
block using ereport/errcode/errmsg/errhint) to instruct users to set the GUC to
the user-typable string value by changing the hint text to: "Set
ivorysql.compatible_mode = 'oracle' to enable this feature." Keep the rest of
the ereport invocation unchanged.

In `@src/backend/parser/parse_with_plsql.c`:
- Around line 249-309: The current check uses (nentryargs - nargs) >
entry->ndefaults which only counts defaults, not whether the omitted suffix is
fully defaulted; change the validation to ensure every omitted parameter
(positions from nargs to nentryargs-1) is a defaulted trailing parameter by
scanning entry->argtypes/entry->analyzeddefaults from the end and counting
contiguous trailing defaults and rejecting the call if omitted_count >
trailing_defaults; also only append analyzeddefaults into *fargs when the
expansion flag (expand_defaults) is true (and remove/avoid hitting Assert by
ensuring we never iterate into non-default params).

In `@src/pl/plisql/src/pl_handler.c`:
- Around line 349-385: buildWithFuncEntries creates WithFuncEntry objects but
never initializes their default-argument metadata, causing garbage reads later;
update buildWithFuncEntries to initialize the default-related fields on each new
WithFuncEntry (match how transformWithFuncDefs sets up defaults) — at minimum
set entry->ndefaults = 0 and entry->analyzeddefaults = NULL (or the appropriate
zero/empty values for those fields) and ensure any flag or mechanism that
triggers default expansion for runtime calls is disabled unless defaults are
properly analyzed; reference buildWithFuncEntries, WithFuncEntry,
p_with_func_list and transformWithFuncDefs to copy the same
initialization/behavior for default handling.
- Around line 287-337: buildParamListForFunc() currently omits FUNC_PARAM_OUT
entries (and returns NULL if nparams==0), which means OUT-only parameters never
get a variable in the compiled WITH subprogram; to fix, count and allocate
ParamListInfo entries for OUT parameters as well (i.e., include fp->mode ==
FUNC_PARAM_OUT when computing nparams), and in the second loop do not skip OUT
params—resolve their type with typenameTypeIdAndMod and populate paramnames and
params[*] (ptype, ptypmod, pmode as (char)fp->mode, isnull/value as appropriate)
so OUT params exist in the resulting ParamListInfo used by
plisql_compile_inline().

---

Outside diff comments:
In `@src/backend/parser/analyze.c`:
- Around line 380-382: The MERGE transformer is not propagating WITH FUNCTION
definitions: update the default transformMergeStmt implementation to call
transformWithClause (as it already does) and then assign qry->withFuncDefs =
stmt->withClause->plsql_defs (and preserve existing qry->hasModifyingCTE
behavior) so that inline function defs from stmt->withClause are propagated into
the resulting Query; modify transformMergeStmt to mirror the withFuncDefs
assignment used by other DML transformers (and by the Oracle hook
implementation) to ensure WITH FUNCTION … MERGE … retains the definitions.

In `@src/include/nodes/parsenodes.h`:
- Around line 1662-1663: The existing comment claiming "WithClause does not
propagate into the Query" is outdated; change the comment(s) around WithClause
(both occurrences) to state that WithClause-derived information is now carried
into Query via Query.withFuncDefs (and that CommonTableExpr still propagates as
before), so future readers understand that Query.withFuncDefs holds data derived
from WithClause.

---

Nitpick comments:
In `@src/backend/executor/execSRF.c`:
- Around line 156-157: Add an explicit Assert to document the invariant that a
WITH-clause function cannot reach this branch: before the else-if that checks
funcexpr->function_from (the block that currently skips calling
subproc_should_change_return_type and falls back to computing funcrettype via
exprType), insert Assert(funcexpr->function_from != FUNC_FROM_WITH_CLAUSE). This
makes the guarantee from init_sexpr (invoked during ExecInitTableFunctionResult)
explicit and will catch regressions where a WITH-clause function could reach
this code path.

In `@src/oracle_test/regress/expected/with_function.out`:
- Around line 11-20: The test defines WITH PROCEDURE do_nothing but never
invokes it; update the test to actually call the procedure and assert a
side-effect-observable result by adding a WITH-function wrapper that invokes
do_nothing and returns a marker (e.g., a function call_wrapper that calls
do_nothing then returns 'procedure ok'), then SELECT the wrapper result so the
output verifies execution semantics of WITH PROCEDURE (reference symbols: WITH
PROCEDURE do_nothing and the new wrapper function name you add).
- Around line 351-363: Add a second EXPLAIN VERBOSE case mirroring the existing
FUNCTION block: after the EXPLAIN (COSTS OFF, VERBOSE) test that exercises WITH
FUNCTION shows_body, add an analogous EXPLAIN that defines a WITH PROCEDURE
(e.g., WITH PROCEDURE shows_proc(...) IS ... END;) and selects/calls it so the
verbose output includes a "WITH Procedure: shows_proc" line and a "Body: ..."
line; update the expected output block to assert those Procedure lines just like
the Function ones so EXPLAIN VERBOSE covers WITH PROCEDURE body text.

In `@src/oracle_test/regress/sql/with_function.sql`:
- Around line 22-28: Add a new test in the WITH-function regression file that
exercises a sibling-call from inside a WITH subprogram body: create two WITH
FUNCTIONS (e.g., add1 and mul2 as in the diff) but modify one function body so
it calls its sibling (for example, have mul2 call add1 internally or vice versa)
and then SELECT the top-level call to exercise the new scope propagation path;
ensure the test lives alongside the existing WITH FUNCTION examples in
src/oracle_test/regress/sql/with_function.sql and uses the same function names
(add1, mul2) so the test covers resolving a sibling WITH function from inside a
subprogram body.
- Around line 8-13: The file only declares the WITH PROCEDURE do_nothing without
invoking it; update the test to actually execute the procedure (e.g., add a CALL
do_nothing; or a BEGIN do_nothing; END; block) and then assert a side-effect or
result (keep the existing SELECT 'procedure ok' AS result or replace with a
SELECT that verifies the side-effect) so the runtime execution, argument binding
and side-effect path for the WITH PROCEDURE named do_nothing is exercised.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 255887cf-561f-450c-9f33-cf6a3814d96f

📥 Commits

Reviewing files that changed from the base of the PR and between 35e086c and c709873.

📒 Files selected for processing (28)
  • contrib/ivorysql_ora/src/merge/ora_merge.c
  • src/backend/commands/explain.c
  • src/backend/executor/execExpr.c
  • src/backend/executor/execSRF.c
  • src/backend/executor/execTuples.c
  • src/backend/optimizer/plan/planner.c
  • src/backend/oracle_parser/ora_gram.y
  • src/backend/parser/Makefile
  • src/backend/parser/analyze.c
  • src/backend/parser/meson.build
  • src/backend/parser/parse_clause.c
  • src/backend/parser/parse_cte.c
  • src/backend/parser/parse_func.c
  • src/backend/parser/parse_with_plsql.c
  • src/backend/utils/fmgr/funcapi.c
  • src/include/nodes/execnodes.h
  • src/include/nodes/parsenodes.h
  • src/include/nodes/plannodes.h
  • src/include/nodes/primnodes.h
  • src/include/oracle_parser/ora_with_function.h
  • src/include/parser/parse_node.h
  • src/oracle_fe_utils/ora_psqlscan.l
  • src/oracle_test/regress/expected/with_function.out
  • src/oracle_test/regress/parallel_schedule
  • src/oracle_test/regress/sql/with_function.sql
  • src/pl/plisql/src/pl_comp.c
  • src/pl/plisql/src/pl_handler.c
  • src/pl/plisql/src/plisql.h

Comment thread src/backend/parser/parse_cte.c Outdated
Comment thread src/backend/parser/parse_with_plsql.c Outdated
Comment thread src/pl/plisql/src/pl_handler.c
Comment thread src/pl/plisql/src/pl_handler.c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

oracle compatibility feature: WITH clause supports procedures and functions

1 participant