diff --git a/NEWS.md b/NEWS.md index 4d0fc911569..b1f211a8ae7 100644 --- a/NEWS.md +++ b/NEWS.md @@ -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_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) * _pgr_trsp(text,text,anyarray,bigint,boolean) @@ -74,6 +75,7 @@ milestone for 4.0.0 **Deprecation of internal C/C++ functions** * _pgr_drivingdistance(text,anyarray,double precision,boolean,boolean) +* _pgr_prim(text,anyarray,text,bigint,double precision) **Internal C/C++ functions in legacy** diff --git a/doc/src/release_notes.rst b/doc/src/release_notes.rst index 6001b557244..5f80e3c95ae 100644 --- a/doc/src/release_notes.rst +++ b/doc/src/release_notes.rst @@ -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_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) * _pgr_trsp(text,text,anyarray,bigint,boolean) @@ -105,6 +106,7 @@ milestone for 4.0.0 .. rubric:: Deprecation of internal C/C++ functions * _pgr_drivingdistance(text,anyarray,double precision,boolean,boolean) +* _pgr_prim(text,anyarray,text,bigint,double precision) .. rubric:: Internal C/C++ functions in legacy diff --git a/sql/sigs/pgrouting--4.0.sig b/sql/sigs/pgrouting--4.0.sig index 4cc42d208d8..942756b0e91 100644 --- a/sql/sigs/pgrouting--4.0.sig +++ b/sql/sigs/pgrouting--4.0.sig @@ -245,7 +245,6 @@ pgr_primdd(text,bigint,numeric) pgr_primdfs(text,anyarray,bigint) pgr_primdfs(text,bigint,bigint) pgr_prim(text) -_pgr_prim(text,anyarray,text,bigint,double precision) _pgr_primv4(text,anyarray,text,bigint,double precision) pgr_pushrelabel(text,anyarray,anyarray) pgr_pushrelabel(text,anyarray,bigint) diff --git a/sql/spanningTree/_prim.sql b/sql/spanningTree/_prim.sql index 3401e2812d8..9da3da2593a 100644 --- a/sql/spanningTree/_prim.sql +++ b/sql/spanningTree/_prim.sql @@ -27,18 +27,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ ----------- ----------- --- mst ----------- ----------- - - ----------------- --- _pgr_prim ----------------- - - --v3.7 CREATE FUNCTION _pgr_primv4( TEXT, -- Edge sql @@ -61,30 +49,3 @@ LANGUAGE C VOLATILE STRICT; COMMENT ON FUNCTION _pgr_primv4(TEXT, ANYARRAY, TEXT, BIGINT, FLOAT) IS 'pgRouting internal function'; - ---v3.0 -CREATE FUNCTION _pgr_prim( - TEXT, -- Edge sql - ANYARRAY, -- tree root for traversal - order_by 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_prim(TEXT, ANYARRAY, TEXT, BIGINT, FLOAT) -IS 'pgRouting internal function deprecated on v3.7.0'; - diff --git a/src/spanningTree/prim.c b/src/spanningTree/prim.c index 93071398f3b..141ae580f6a 100644 --- a/src/spanningTree/prim.c +++ b/src/spanningTree/prim.c @@ -171,7 +171,11 @@ PGDLLEXPORT Datum _pgr_primv4(PG_FUNCTION_ARGS) { } } -/******************************************************************************/ +/* Deprecated code starts here + * This code is used on v3.6 and under + * + * TODO(v5) Move to legacy + */ PGDLLEXPORT Datum _pgr_prim(PG_FUNCTION_ARGS); PG_FUNCTION_INFO_V1(_pgr_prim); @@ -183,6 +187,12 @@ PGDLLEXPORT Datum _pgr_prim(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();