Hello Frank,<br><br>You need to login to your pgrouting db instead of postgres db.<br>Try this from terminal and then running the query:<br> psql -d <pgrouting_db> -U <user><br><br>Yasir<br><br><div class="gmail_quote">
On 29 July 2010 12:32, Salet Frank <span dir="ltr"><<a href="mailto:frank.salet@localyse.nl">frank.salet@localyse.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div link="blue" vlink="purple" lang="NL">
<div>
<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(89, 89, 89);" lang="EN-US">Hey everybody,</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(89, 89, 89);" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(89, 89, 89);" lang="EN-US">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!</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(89, 89, 89);" lang="EN-US"> </span></p>
<p><span lang="EN-US">postgres=# SELECT * FROM
shortest_path('SELECT gid as id, source::integer, target::integer,
length::double precision as cost FROM ways',10, 20, false, false);</span></p>
<p><span lang="EN-US">ERROR: function
shortest_path(unknown, integer, integer, boolean, boolean) does not exist</span></p>
<p><span lang="EN-US">LINE 1: SELECT * FROM
shortest_path('SELECT gid as id, source::integ...</span></p>
<p><span lang="EN-US">HINT: No function matches the
given name and argument types. You might need to add explicit type casts.</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">The function does exist because I executed:</span></p>
<p class="MsoNormal"><span lang="EN-US">CREATE OR REPLACE FUNCTION
shortest_path(sql text, source_id integer, target_id integer, directed boolean,
has_reverse_cost boolean)<br>
RETURNS SETOF path_result AS<br>
'/usr/lib/postgresql/8.4/lib/librouting', 'shortest_path'<br>
LANGUAGE 'c' IMMUTABLE STRICT<br>
COST 1<br>
ROWS 1000;<br>
ALTER FUNCTION shortest_path(text, integer, integer, boolean, boolean) OWNER TO
postgres;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(89, 89, 89);" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(89, 89, 89);" lang="EN-US">Regards</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(89, 89, 89);" lang="EN-US">Frank</span></p>
</div>
</div>
<br>_______________________________________________<br>
Pgrouting-users mailing list<br>
<a href="mailto:Pgrouting-users@lists.osgeo.org">Pgrouting-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/pgrouting-users</a><br>
<br></blockquote></div><br>