According to the documentation :
- cost: double precision value of the edge traversal cost. (a negative cost
will prevent the edge from being inserted in the graph).
Yet when I have a negative cost (-1) to forbid using an edge it seems to crash (I don't know what really happens :
testdb=# SELECT * FROM shortest_path('SELECT edge_id AS id, source_id::int4 as source, target_id::int4 as target, cost::double precision AS cost FROM streets_topology',18342, 49625, false, false);
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
If I set the cost to a high value, or 'Infinity' it works correctly.
I suppose that the algorithm considers that the edge exists and has a negative cost (which is a problem with Dijkstra).