[英]Does PostgreSQL version 10 support pgRouting version 2.6?
I installed pgRouting version 2.6 through brew and I have PostgreSQL version 10.4. 我通过brew安装了pgRouting 2.6版,而我的PostgreSQL是10.4版。 Now I have question: does this PostgreSQL version support pgRouting extension or not? 现在我有一个问题:这个PostgreSQL版本是否支持pgRouting扩展? Because every time I query: 因为每次我查询:
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);
This query fails and give error message: 该查询失败并给出错误消息:
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
That function is outdated and removed from the core since version 2.0; 自2.0版以来,该功能已过时并从核心中删除; you want to use one of the current collection of routing functions, eg 您想使用当前路由功能集合之一,例如
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
);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.