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 28 29 30 31 32 33 34 35 36 37 38
|
/* :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 */
/* -- q2 */
SELECT * FROM pgr_dagShortestPath(
'SELECT id, source, target, cost FROM edges',
5, 11);
/* -- q3 */
SELECT * FROM pgr_dagShortestPath(
'SELECT id, source, target, cost FROM edges',
5, ARRAY[7, 11]);
/* -- q4 */
SELECT * FROM pgr_dagShortestPath(
'SELECT id, source, target, cost FROM edges',
ARRAY[5, 10], 11);
/* -- q5 */
SELECT * FROM pgr_dagShortestPath(
'SELECT id, source, target, cost FROM edges',
ARRAY[5, 15], ARRAY[11, 17]);
/* -- q51 */
SELECT source, target FROM combinations;
/* -- q52 */
SELECT * FROM pgr_dagShortestPath(
'SELECT id, source, target, cost FROM edges',
'SELECT source, target FROM combinations');
/* -- q6 */
SELECT * FROM pgr_dagShortestPath(
'SELECT id, source, target, cost FROM edges',
ARRAY[5, 10, 5, 10, 10, 5], ARRAY[11, 17, 17, 11]);
/* -- q7 */
SELECT * FROM pgr_dagShortestPath(
'SELECT id, source, target, cost FROM edges',
ARRAY[5, 10, 11], ARRAY[5, 10, 11]);
/* -- q8 */
SELECT * FROM pgr_dagShortestPath(
'SELECT id, source, target, cost FROM edges',
'SELECT * FROM (VALUES (6, 10), (6, 7), (12, 10)) AS combinations (source, target)');
/* -- q9 */
|