Skip to content

Commit 0665496

Browse files
committed
Removal of _pgr_kruskal deprecated internal function
* SQL removal * C NOTICE raised about deprecation
1 parent 1fa5da4 commit 0665496

File tree

5 files changed

+15
-28
lines changed

5 files changed

+15
-28
lines changed

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ milestone for 4.0.0
6060
* _pgr_dijkstra(text,anyarray,anyarray,boolean,boolean,boolean,bigint)
6161
* _pgr_dijkstra(text,text,boolean,boolean,boolean)
6262
* _pgr_drivingdistance(text,anyarray,double precision,boolean,boolean)
63+
* _pgr_kruskal(text,anyarray,text,bigint,double precision)
6364
* _pgr_prim(text,anyarray,text,bigint,double precision)
6465
* _pgr_trsp(text,integer,double precision,integer,double precision,boolean,boolean,text)
6566
* _pgr_trsp(text,text,anyarray,anyarray,boolean)
@@ -75,6 +76,7 @@ milestone for 4.0.0
7576
**Deprecation of internal C/C++ functions**
7677

7778
* _pgr_drivingdistance(text,anyarray,double precision,boolean,boolean)
79+
* _pgr_kruskal(text,anyarray,text,bigint,double precision)
7880
* _pgr_prim(text,anyarray,text,bigint,double precision)
7981

8082
**Internal C/C++ functions in legacy**

doc/src/release_notes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ milestone for 4.0.0
9191
* _pgr_dijkstra(text,anyarray,anyarray,boolean,boolean,boolean,bigint)
9292
* _pgr_dijkstra(text,text,boolean,boolean,boolean)
9393
* _pgr_drivingdistance(text,anyarray,double precision,boolean,boolean)
94+
* _pgr_kruskal(text,anyarray,text,bigint,double precision)
9495
* _pgr_prim(text,anyarray,text,bigint,double precision)
9596
* _pgr_trsp(text,integer,double precision,integer,double precision,boolean,boolean,text)
9697
* _pgr_trsp(text,text,anyarray,anyarray,boolean)
@@ -106,6 +107,7 @@ milestone for 4.0.0
106107
.. rubric:: Deprecation of internal C/C++ functions
107108

108109
* _pgr_drivingdistance(text,anyarray,double precision,boolean,boolean)
110+
* _pgr_kruskal(text,anyarray,text,bigint,double precision)
109111
* _pgr_prim(text,anyarray,text,bigint,double precision)
110112

111113
.. rubric:: Internal C/C++ functions in legacy

sql/sigs/pgrouting--4.0.sig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ pgr_kruskaldd(text,bigint,numeric)
184184
pgr_kruskaldfs(text,anyarray,bigint)
185185
pgr_kruskaldfs(text,bigint,bigint)
186186
pgr_kruskal(text)
187-
_pgr_kruskal(text,anyarray,text,bigint,double precision)
188187
_pgr_kruskalv4(text,anyarray,text,bigint,double precision)
189188
pgr_ksp(text,anyarray,anyarray,integer,boolean,boolean)
190189
_pgr_ksp(text,anyarray,anyarray,integer,boolean,boolean,boolean)

sql/spanningTree/_kruskal.sql

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -53,29 +53,3 @@ LANGUAGE C VOLATILE STRICT;
5353

5454
COMMENT ON FUNCTION _pgr_kruskalv4(TEXT, ANYARRAY, TEXT, BIGINT, FLOAT)
5555
IS 'pgRouting internal function';
56-
57-
--v3.0
58-
CREATE FUNCTION _pgr_kruskal(
59-
TEXT, -- Edge sql
60-
ANYARRAY, -- tree root for traversal
61-
fn_suffix TEXT,
62-
max_depth BIGINT,
63-
distance FLOAT,
64-
65-
OUT seq BIGINT,
66-
OUT depth BIGINT,
67-
OUT start_vid BIGINT,
68-
OUT node BIGINT,
69-
OUT edge BIGINT,
70-
OUT cost FLOAT,
71-
OUT agg_cost FLOAT)
72-
RETURNS SETOF RECORD AS
73-
'MODULE_PATHNAME'
74-
LANGUAGE C VOLATILE STRICT;
75-
76-
77-
-- COMMENTS
78-
79-
80-
COMMENT ON FUNCTION _pgr_kruskal(TEXT, ANYARRAY, TEXT, BIGINT, FLOAT)
81-
IS 'pgRouting internal function deprecated on v3.7.0';

src/spanningTree/kruskal.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,11 @@ PGDLLEXPORT Datum _pgr_kruskalv4(PG_FUNCTION_ARGS) {
170170
}
171171
}
172172

173-
/***********************************************************************************/
173+
/* Deprecated code starts here
174+
* This code is used on v3.6 and under
175+
*
176+
* TODO(v5) Move to legacy
177+
*/
174178

175179
PGDLLEXPORT Datum _pgr_kruskal(PG_FUNCTION_ARGS);
176180
PG_FUNCTION_INFO_V1(_pgr_kruskal);
@@ -182,6 +186,12 @@ PGDLLEXPORT Datum _pgr_kruskal(PG_FUNCTION_ARGS) {
182186
MST_rt *result_tuples = NULL;
183187
size_t result_count = 0;
184188

189+
ereport(NOTICE, (
190+
errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
191+
errmsg("A stored procedure is using deprecated C internal function '%s'", __func__),
192+
errdetail("Library function '%s' was deprecated in pgRouting %s", __func__, "3.7.0"),
193+
errhint("Consider upgrade pgRouting")));
194+
185195
if (SRF_IS_FIRSTCALL()) {
186196
MemoryContext oldcontext;
187197
funcctx = SRF_FIRSTCALL_INIT();

0 commit comments

Comments
 (0)