Hi Dave,
“Normally” people use functions with positional parameters.
(about my quotes in words read [1])
Using proposed function pgr_dijkstraCost as example:
When you write a function call:
SELECT * FROM pgr_dijkstraCost(‘SELECT * from edge_table’, 2, 3);
SELECT * FROM pgr_dijkstraCost(‘SELECT * from edge_table’, 2, 3, false);
This works also (mixed)
SELECT * FROM pgr_dijkstraCost(‘SELECT * from edge_table’, 2, 3, directed:=false);
No one has complained that this can’t be done on 2.6 (or for the last 2 years for that matter) on the function pgr_dijkstraCost:
SELECT * FROM pgr_dijkstraCost(edge_sql:=‘SELECT * from edge_table’, start_vid:=2, end_vid:=3);
I would think that is because “normally” people use functions with positional parameters.
The changes are on the function calls, not on the function’s return column names.
So if you application has a wrapper:
CREATE FUNCTION mywarper1(…)
…
RETURN QUERY
SELECT end_vid, cost FROM pgr_dijkstraCost(‘SELECT * from edge_table’, 2, 3);
…
The columns end_vid & cost names are not changed, so your warpper is ok
In the case of pgr_dijkstra
in 2.6 this can be done
SELECT * FROM pgr_dijkstra(end_vid:=3, start_vid:=2, edge_sql:=‘SELECT * from edge_table’);
So if you application has a wrapper:
CREATE FUNCTION mywarper2(…)
…
RETURN QUERY
SELECT * FROM pgr_dijkstra(end_vid:=3, start_vid:=2, edge_sql:=‘SELECT * from edge_table’);
…
you will need to change your wrapper
CREATE FUNCTION mywarper2(…)
…
RETURN QUERY
SELECT * FROM pgr_dijkstra(‘SELECT * from edge_table’, 2, 3);
…
But the output columns are not affected, so other queries that use the mywrapper2 should remain the same
Regards
Vicky
[1] https://twitter.com/jodygarnett/status/1054257267095171072
···
Georepublic UG (haftungsbeschränkt)
Salzmannstraße 44,
81739 München, Germany
Vicky Vergara
Operations Research
eMail: vicky@[georepublic.de](http://georepublic.de)
Web: [https://georepublic.info](https://georepublic.info)
Tel: +49 (089) 4161 7698-1
Fax: +49 (089) 4161 7698-9
Commercial register: Amtsgericht München, HRB 181428
CEO: Daniel Kastl