【发布时间】:2018-06-07 07:48:43
【问题描述】:
我通过 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
【问题讨论】:
-
那么你安装 pgRouting 通过运行
create extension pgrouting记录了in the manual -
是的 @a_horse_with_no_name 。在数据库中,我查询 CREATE EXTENSION pgrouting 并创建,并给出消息 EXTENSION CREATED。
标签: postgresql gis postgis postgresql-10 pgrouting