Skip to content

PostgreSQL: Support SEARCH on a recursive CTE - #2981

Open
LucaCappelletti94 wants to merge 1 commit into
mainfrom
upstream/pg-cte-search
Open

LucaCappelletti94 wants to merge 1 commit into
mainfrom
upstream/pg-cte-search

Conversation

@LucaCappelletti94

Copy link
Copy Markdown
Contributor

This PR makes Cte carry an optional search field, behind the new Dialect::supports_cte_search_clause, which PostgreSQL and Generic enable, so as to support WITH RECURSIVE r (id, parent_id) AS (...) SEARCH DEPTH FIRST BY id SET ordercol SELECT id FROM r.

This is the first of yet another stack.

@LucaCappelletti94 LucaCappelletti94 added enhancement New feature or request PostgreSQL labels Nov 15, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 71.42857% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.26%. Comparing base (96a5132) to head (34162e7).

Files with missing lines Patch % Lines
src/ast/spans.rs 20.00% 7 Missing and 1 partial ⚠️
src/parser/mod.rs 68.18% 3 Missing and 4 partials ⚠️
src/ast/query.rs 93.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2981      +/-   ##
==========================================
- Coverage   83.28%   83.26%   -0.03%     
==========================================
  Files          42       42              
  Lines       35355    35406      +51     
  Branches    35355    35406      +51     
==========================================
+ Hits        29446    29480      +34     
- Misses       2458     2469      +11     
- Partials     3451     3457       +6     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request PostgreSQL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants