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
|
/* :file: This file is part of the pgRouting project.
:copyright: Copyright (c) 2021-2026 pgRouting developers
:license: Creative Commons Attribution-Share Alike 3.0 https://creativecommons.org/licenses/by-sa/3.0 */
BEGIN;
UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost);
SELECT plan(2);
PREPARE noflag AS
SELECT * FROM pgr_maxCardinalityMatch(
'SELECT id, source, target, cost, reverse_cost FROM edges'
);
PREPARE mcm_noflag AS
SELECT * FROM pgr_maxCardinalityMatch(
'SELECT id, source, target, cost AS going, reverse_cost AS coming FROM edges'
);
SELECT CASE
WHEN min_lib_version('3.4.0') THEN lives_ok('noflag','Using cost and reverse_cost')
ELSE skip(1, 'pgr_maxCardinalityMatch new parameters in 3.4.0') END;
SELECT lives_ok('mcm_noflag','Using coming and going');
SELECT finish();
ROLLBACK;
|