I'm trying to find how the implementation of shortest_path() in pgRouting works.
This is the function definition:
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 '$libdir/librouting', 'shortest_path'
LANGUAGE c IMMUTABLE STRICT
COST 1
ROWS 1000;
ALTER FUNCTION shortest_path(text, integer, integer, boolean, boolean) OWNER TO postgres;
My questions are:
- How does it calls the .c file and how it passes the parameters to it (I believe it's dijkstra.c file, correct?)
- How can I take that .c file and compile it with the debug info it has in order to see how it works so I can understand it better?