Re: SEARCH and CYCLE clauses

Peter Eisentraut <peter.eisentraut@2ndquadrant.com>

From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Vik Fearing <vik@postgresfriends.org>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2020-06-15T09:49:53Z
Lists: pgsql-hackers

Attachments

Here is an updated patch that I think fixes all the cases that you 
identified.  (The issue of what kinds of constants or expressions to 
accept for cycle marks has not been touched.)  To fix the star expansion 
I had to add a little bit of infrastructure that could also be used as a 
more general facility "don't include this column in star expansion", so 
this could perhaps use some consideration from a more general angle as well.

More tests and breakage reports welcome.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Commits

  1. Enhanced cycle mark values

  2. SEARCH and CYCLE clauses

  3. doc: Expand recursive query documentation

  4. Adjust cycle detection examples and tests