[pgrouting-users] Function shortest_path does not exist

Salet Frank frank.salet at localyse.nl
Thu Jul 29 12:32:56 EDT 2010


Hey everybody,

Sorry for disturbing you but I'm a little bit lost in one simple and probably easy to solve issue but I can't see it anymore. What is wrong with this request? Why is the inner-query treated as unknown instead of text? Thank you!


postgres=# SELECT * FROM shortest_path('SELECT gid as id, source::integer, target::integer, length::double precision as cost FROM ways',10, 20, false, false);

ERROR:  function shortest_path(unknown, integer, integer, boolean, boolean) does not exist

LINE 1: SELECT * FROM shortest_path('SELECT gid as id, source::integ...

HINT:  No function matches the given name and argument types. You might need to add explicit type casts.

The function does exist because I executed:
CREATE OR REPLACE FUNCTION shortest_path(sql text, source_id integer, target_id integer, directed boolean, has_reverse_cost boolean)
  RETURNS SETOF path_result AS
'/usr/lib/postgresql/8.4/lib/librouting', 'shortest_path'
  LANGUAGE 'c' IMMUTABLE STRICT
  COST 1
  ROWS 1000;
ALTER FUNCTION shortest_path(text, integer, integer, boolean, boolean) OWNER TO postgres;

Regards
Frank
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20100729/abb4b9e7/attachment.html


More information about the Pgrouting-users mailing list