1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
BEGIN;
BEGIN
SET client_min_messages TO NOTICE;
SET
/* -- q1 */
SELECT * FROM pgr_transitiveclosure(
'SELECT id, source, target, cost, reverse_cost
FROM edges WHERE id IN (2, 3, 5, 11, 12, 13, 15)')
ORDER BY vid;
seq | vid | target_array
-----+-----+--------------------
1 | 6 | {}
6 | 8 | {12,17,16}
2 | 10 | {12,17,16,11,6}
4 | 11 | {12,17,16}
5 | 12 | {17,16}
3 | 15 | {12,17,16,10,11,6}
8 | 16 | {17,16}
7 | 17 | {17,16}
(8 rows)
/* -- q2 */
ROLLBACK;
ROLLBACK
|