I have one spatial table with gid, FNODE_, TNODE_ and LENGTH column in my Postgresql/PostGIS database. I am using pgRouting. Problem is, when i try with shortest path query it shows following error. But it should not be. I double check my geographical database there is a connection between 505793 and 496514 nodes. But, whenever i query it shows following error.
SELECT * FROM shortest_path(' SELECT "gid" as id, "FNODE_"::integer, "TNODE_"::integer, "LENGTH"::double precision as cost FROM roads_dist', 505793, 496514, false, false); ERROR: Error, query must return columns 'id', 'source', 'target' and 'cost' ********** Error ********** ERROR: Error, query must return columns 'id', 'source', 'target' and 'cost' SQL state: XX000
Thanks, in advance.