I want to use Dijkstra algorithm. I would like to have the algorithm find a route based on a boolean traffic column, using only roads where the boolean column value is true.
The code below does not return anything.
CREATE TABLE routeWithTraf AS SELECT seq, id1 AS node, id2 AS edge, cost, b.geom FROM pgr_dijkstra('
SELECT gid AS id,
source::integer,
target::integer,
length::double precision AS cost
FROM roads WHERE traffic != false',
67931, 5602, false, false) a LEFT JOIN roads b ON (a.id2 = b.gid);
WHERE traffic = true
?