From: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | SEARCH and CYCLE clauses |
Date: | 2020-05-20 11:46:18 |
Message-ID: | db80ceee-6f97-9b4a-8ee8-3ba0c58e5be2@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I have implemented the SEARCH and CYCLE clauses.
This is standard SQL syntax attached to a recursive CTE to compute a
depth- or breadth-first ordering and cycle detection, respectively.
This is just convenience syntax for what you can already do manually.
The original discussion about recursive CTEs briefly mentioned these as
something to do later but then it was never mentioned again.
SQL specifies these in terms of syntactic transformations, and so that's
how I have implemented them also, mainly in the rewriter.
I have successfully tested this against examples I found online that
were aimed at DB2.
The contained documentation and the code comment in rewriteHandler.c
explain the details.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Attachment | Content-Type | Size |
---|---|---|
v1-0001-SEARCH-and-CYCLE-clauses.patch | text/plain | 78.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | David Rowley | 2020-05-20 11:47:05 | Re: Subplan result caching |
Previous Message | David Rowley | 2020-05-20 11:44:27 | Hybrid Hash/Nested Loop joins and caching results from subplans |