PostgreSQL 版本 10 是否支持 pgRouting 版本 2.6?



我通过brew安装了pgRouting 2.6版本,我有PostgreSQL版本10.4。现在我有问题:这个PostgreSQL版本是否支持pgRouting extension?因为每次我查询时:

SELECT * 
FROM shortest_path('SELECT gid AS id, start_id::int4 AS source, end_id::int4 AS target, cost_length::float8 AS cost FROM network', 1, 135, false, false);

此查询失败并给出错误消息:

ERROR:  function shortest_path(unknown, integer, integer, boolean, boolean) does not exist
LINE 1: SELECT * FROM shortest_path('
^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
Query failed

该函数已过时,自 2.0 版以来已从核心中删除; 您想使用当前的路由函数集合之一,例如

SELECT * 
FROM pgr_Dijkstra(
'SELECT gid AS id,
start_id::int4 AS source,
end_id::int4 AS target,
cost_length::float8 AS cost
FROM network',
1,
135,
false
);

最新更新