Re: SEARCH and CYCLE clauses

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: SEARCH and CYCLE clauses
Date: 2020-09-22 18:43:58
Message-ID: CAFj8pRAbyt2uk2icgcLYfDQGa+SjQcHSoDLpNZDDhnO+KJsQRw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2020-09-22 19:41:11 Re: new heapcheck contrib module
Previous Message Pavel Stehule 2020-09-22 18:29:33 Re: SEARCH and CYCLE clauses