pgRouting / pgrouting

Repository contains pgRouting library. Development branch is "develop", stable branch is "master"
https://pgrouting.org
GNU General Public License v2.0
1.16k stars 366 forks source link

Unifying return columns for pgr_dijkstra #2455

Closed cvvergara closed 1 year ago

cvvergara commented 1 year ago

Discussed in https://github.com/pgRouting/pgrouting/discussions/2224

Originally posted by **cvvergara** December 16, 2021 ``` For example on dijkstra pgr_dijkstra(Edges SQL, start_vid, end_vid [, directed]) pgr_dijkstra(Edges SQL, start_vid, end_vids [, directed]) pgr_dijkstra(Edges SQL, start_vids, end_vid [, directed]) pgr_dijkstra(Edges SQL, start_vids, end_vids [, directed]) pgr_dijkstra(Edges SQL, Combinations SQL [, directed]) RETURNS SET OF (seq, path_seq [, start_vid] [, end_vid], node, edge, cost, agg_cost) ``` Depending on the call, are the columns returned Change to ``` RETURNS SET OF (seq, path_seq , start_vid, end_vid, node, edge, cost, agg_cost) ``` That way regardless of the call the same columns are returned That unification of many other official, proposed and experimental functions like pgr_astar, pgr_bdAstar etc. Having for the same (family) calls the same returned columns, makes it easier to remember, aka less complicated API