Re: SEARCH and CYCLE clauses - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: SEARCH and CYCLE clauses
Date
Msg-id CAFj8pRAbyt2uk2icgcLYfDQGa+SjQcHSoDLpNZDDhnO+KJsQRw@mail.gmail.com
Whole thread Raw
In response to Re: SEARCH and CYCLE clauses  (Pavel Stehule <pavel.stehule@gmail.com>)
List 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

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: SEARCH and CYCLE clauses
Next
From: Robert Haas
Date:
Subject: Re: new heapcheck contrib module