SEARCH and CYCLE clauses - Mailing list pgsql-hackers

From Peter Eisentraut
Subject SEARCH and CYCLE clauses
Date
Msg-id db80ceee-6f97-9b4a-8ee8-3ba0c58e5be2@2ndquadrant.com
Whole thread Raw
Responses Re: SEARCH and CYCLE clauses
Re: SEARCH and CYCLE clauses
List 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

pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Hybrid Hash/Nested Loop joins and caching results from subplans
Next
From: David Rowley
Date:
Subject: Re: Subplan result caching