Re: SEARCH and CYCLE clauses
Pavel Stehule <pavel.stehule@gmail.com>
From: Pavel Stehule <pavel.stehule@gmail.com>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2020-09-22T18:43:58Z
Lists: pgsql-hackers
Hi
I found another bug
create view xx as WITH recursive destinations (departure, arrival,
connections, cost, itinerary) AS
(SELECT f.departure, f.arrival, 1, price,
CAST(f.departure || f.arrival AS VARCHAR(2000))
FROM flights f
WHERE f.departure = 'New York'
UNION ALL
SELECT r.departure, b.arrival, r.connections + 1 ,
r.cost + b.price, CAST(r.itinerary || b.arrival AS
VARCHAR(2000))
FROM destinations r, flights b
WHERE r.arrival = b.departure)
CYCLE arrival SET cyclic_data TO '1' DEFAULT '0' using path
SELECT departure, arrival, itinerary, cyclic_data
FROM destinations ;
postgres=# select * from xx;
ERROR: attribute number 6 exceeds number of columns 5
Regards
Pavel
Commits
-
Enhanced cycle mark values
- f4adc41c4f92 14.0 landed
-
SEARCH and CYCLE clauses
- 3696a600e229 14.0 landed
-
doc: Expand recursive query documentation
- 323ae003e464 14.0 landed
-
Adjust cycle detection examples and tests
- 3fb676504da9 14.0 landed