dijkstra (#16) - Routing (#186) - Message List

Routing

Hell Anton, Can you assist me to take a look at this error? It looks simple but complex to resolve.

Each time i tried to execute this function, i always get same error.

SELECT gid, AsText?(the_geom) AS the_geom FROM dijkstra_sp_delta('Brunei_Mainroads', 1, 98, 0.001);

Error: ********** Error ********** ERROR: relation ""Brunei_Mainroads"" does not exist SQL state: 42P01 Context: SQL statement "select srid(the_geom) from """Brunei_Mainroads""" limit 1" PL/pgSQL function "dijkstra_sp_delta_directed" line 33 at FOR over EXECUTE statement PL/pgSQL function "dijkstra_sp_delta" line 18 at FOR over EXECUTE statement

Same error applies when i try to execute SELECT gid, AsText?(the_geom) AS the_geom FROM astar_sp_delta('Brunei_Mainroads', 1, 98, 0.001); Error message

ERROR: relation ""Brunei_Mainroads"" does not exist SQL state: 42P01 Context: SQL statement "select srid(the_geom) from """Brunei_Mainroads""" limit 1" PL/pgSQL function "astar_sp_delta_directed" line 34 at FOR over EXECUTE statement PL/pgSQL function "astar_sp_delta" line 19 at FOR over EXECUTE statement

I tried looking into these functions but was getting these errors select astar_sp_directed('Brunei_Mainroads',1,98,false,false); select astar_sp_delta_directed('Brunei_Mainroads',1,98,0.001,false,false); Error same for both functions: ERROR: set-valued function called in context that cannot accept a set SQL state: 0A000 Context: PL/pgSQL function "astar_sp_directed" line 36 at RETURN NEXT

Any suggestion or advice would be highly appreciated. Thank you

  • Message #654

    Interesting.

    It looks like the table name has too many quotation marks. It never happened before. Can you please tell me what is you PostgreSQL, PostGIS and pgRouting versions?

    • Message #655

      Hello Anton,

      I am currently using the following versions:

      PostgreSQL 8.3.4

      PostGIS 1.3.3

      PgRouting? 1.03

      However, for your information each time i want to query my table, it requires me to use double quote or else it will flag error – table not exist.

      See an example below:

      With double quote: select * from "Brunei_Mainroads"; Result: Success!

      Without double quote: select * from Brunei_Mainroads; Result: ERROR! ERROR: relation "brunei_mainroads" does not exist

      ********** Error **********

      ERROR: relation "brunei_mainroads" does not exist SQL state: 42P01

      Hope these information can help is resolving this issue. Thank you

      • Message #656

        OK, I see. PostgreSQL supports capital letters in table and column names, but it requires them to be quoted in queries. It should work with the shortest path functions, but for some reason it doesn't, sorry. So, you can rename your table to brunei_mainroads or wait until I fix the shortest path functions.