1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
BEGIN;
BEGIN
SET client_min_messages TO NOTICE;
SET
/* :file: This file is part of the pgRouting project.
:copyright: Copyright (c) 2018-2026 pgRouting developers
:license: Creative Commons Attribution-Share Alike 3.0 https://creativecommons.org/licenses/by-sa/3.0 */
/* -- 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 node;
node | targets
------+--------------------
6 | {}
8 | {12,17,16}
10 | {12,17,16,11,6}
11 | {12,17,16}
12 | {17,16}
15 | {12,17,16,10,11,6}
16 | {17,16}
17 | {17,16}
(8 rows)
/* -- q2 */
ROLLBACK;
ROLLBACK
|