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

时间:2018-06-07 07:48:43

标签: postgresql gis postgis postgresql-10 pgrouting

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

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

1 个答案:

答案 0 :(得分:0)

自2.0版以来,该功能已过时并从核心中删除;您想使用current collection路由功能之一,例如

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
     );