Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ milestone for 4.0.0
* _pgr_dijkstra(text,anyarray,anyarray,boolean,boolean,boolean,bigint)
* _pgr_dijkstra(text,text,boolean,boolean,boolean)
* _pgr_drivingdistance(text,anyarray,double precision,boolean,boolean)
* _pgr_kruskal(text,anyarray,text,bigint,double precision)
* _pgr_prim(text,anyarray,text,bigint,double precision)
* _pgr_trsp(text,integer,double precision,integer,double precision,boolean,boolean,text)
* _pgr_trsp(text,text,anyarray,anyarray,boolean)
Expand All @@ -75,6 +76,7 @@ milestone for 4.0.0
**Deprecation of internal C/C++ functions**

* _pgr_drivingdistance(text,anyarray,double precision,boolean,boolean)
* _pgr_kruskal(text,anyarray,text,bigint,double precision)
* _pgr_prim(text,anyarray,text,bigint,double precision)

**Internal C/C++ functions in legacy**
Expand Down
2 changes: 2 additions & 0 deletions doc/src/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ milestone for 4.0.0
* _pgr_dijkstra(text,anyarray,anyarray,boolean,boolean,boolean,bigint)
* _pgr_dijkstra(text,text,boolean,boolean,boolean)
* _pgr_drivingdistance(text,anyarray,double precision,boolean,boolean)
* _pgr_kruskal(text,anyarray,text,bigint,double precision)
* _pgr_prim(text,anyarray,text,bigint,double precision)
* _pgr_trsp(text,integer,double precision,integer,double precision,boolean,boolean,text)
* _pgr_trsp(text,text,anyarray,anyarray,boolean)
Expand All @@ -106,6 +107,7 @@ milestone for 4.0.0
.. rubric:: Deprecation of internal C/C++ functions

* _pgr_drivingdistance(text,anyarray,double precision,boolean,boolean)
* _pgr_kruskal(text,anyarray,text,bigint,double precision)
* _pgr_prim(text,anyarray,text,bigint,double precision)

.. rubric:: Internal C/C++ functions in legacy
Expand Down
1 change: 0 additions & 1 deletion sql/sigs/pgrouting--4.0.sig
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ pgr_kruskaldd(text,bigint,numeric)
pgr_kruskaldfs(text,anyarray,bigint)
pgr_kruskaldfs(text,bigint,bigint)
pgr_kruskal(text)
_pgr_kruskal(text,anyarray,text,bigint,double precision)
_pgr_kruskalv4(text,anyarray,text,bigint,double precision)
pgr_ksp(text,anyarray,anyarray,integer,boolean,boolean)
_pgr_ksp(text,anyarray,anyarray,integer,boolean,boolean,boolean)
Expand Down
26 changes: 0 additions & 26 deletions sql/spanningTree/_kruskal.sql
Original file line number Diff line number Diff line change
Expand Up @@ -53,29 +53,3 @@ LANGUAGE C VOLATILE STRICT;

COMMENT ON FUNCTION _pgr_kruskalv4(TEXT, ANYARRAY, TEXT, BIGINT, FLOAT)
IS 'pgRouting internal function';

--v3.0
CREATE FUNCTION _pgr_kruskal(
TEXT, -- Edge sql
ANYARRAY, -- tree root for traversal
fn_suffix TEXT,
max_depth BIGINT,
distance FLOAT,

OUT seq BIGINT,
OUT depth BIGINT,
OUT start_vid BIGINT,
OUT node BIGINT,
OUT edge BIGINT,
OUT cost FLOAT,
OUT agg_cost FLOAT)
RETURNS SETOF RECORD AS
'MODULE_PATHNAME'
LANGUAGE C VOLATILE STRICT;


-- COMMENTS


COMMENT ON FUNCTION _pgr_kruskal(TEXT, ANYARRAY, TEXT, BIGINT, FLOAT)
IS 'pgRouting internal function deprecated on v3.7.0';
12 changes: 11 additions & 1 deletion src/spanningTree/kruskal.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,11 @@ PGDLLEXPORT Datum _pgr_kruskalv4(PG_FUNCTION_ARGS) {
}
}

/***********************************************************************************/
/* Deprecated code starts here
* This code is used on v3.6 and under
*
* TODO(v5) Move to legacy
*/

PGDLLEXPORT Datum _pgr_kruskal(PG_FUNCTION_ARGS);
PG_FUNCTION_INFO_V1(_pgr_kruskal);
Expand All @@ -182,6 +186,12 @@ PGDLLEXPORT Datum _pgr_kruskal(PG_FUNCTION_ARGS) {
MST_rt *result_tuples = NULL;
size_t result_count = 0;

ereport(NOTICE, (
errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("A stored procedure is using deprecated C internal function '%s'", __func__),
errdetail("Library function '%s' was deprecated in pgRouting %s", __func__, "3.7.0"),
errhint("Consider upgrade pgRouting")));

if (SRF_IS_FIRSTCALL()) {
MemoryContext oldcontext;
funcctx = SRF_FIRSTCALL_INIT();
Expand Down