@@ -33,6 +33,7 @@ CREATE OR REPLACE FUNCTION pgr_depthFirstSearch(
33
33
BIGINT , -- root_vid (required)
34
34
35
35
max_depth BIGINT DEFAULT 9223372036854775807 ,
36
+ directed BOOLEAN DEFAULT true,
36
37
37
38
OUT seq BIGINT ,
38
39
OUT depth BIGINT ,
52
53
53
54
RETURN QUERY
54
55
SELECT *
55
- FROM _pgr_depthFirstSearch(_pgr_get_statement($1 ), ARRAY[$2 ]::BIGINT [], $ 3 );
56
+ FROM _pgr_depthFirstSearch(_pgr_get_statement($1 ), ARRAY[$2 ]::BIGINT [], max_depth, directed );
56
57
END;
57
58
$BODY$
58
59
LANGUAGE plpgsql VOLATILE STRICT;
@@ -64,6 +65,7 @@ CREATE OR REPLACE FUNCTION pgr_depthFirstSearch(
64
65
ANYARRAY, -- root_vids (required)
65
66
66
67
max_depth BIGINT DEFAULT 9223372036854775807 ,
68
+ directed BOOLEAN DEFAULT true,
67
69
68
70
OUT seq BIGINT ,
69
71
OUT depth BIGINT ,
83
85
84
86
RETURN QUERY
85
87
SELECT *
86
- FROM _pgr_depthFirstSearch(_pgr_get_statement($1 ), $2 , $ 3 );
88
+ FROM _pgr_depthFirstSearch(_pgr_get_statement($1 ), $2 , max_depth, directed );
87
89
END;
88
90
$BODY$
89
91
LANGUAGE plpgsql VOLATILE STRICT;
@@ -92,26 +94,26 @@ LANGUAGE plpgsql VOLATILE STRICT;
92
94
-- COMMENTS
93
95
94
96
95
- COMMENT ON FUNCTION pgr_depthFirstSearch(TEXT , BIGINT , BIGINT )
97
+ COMMENT ON FUNCTION pgr_depthFirstSearch(TEXT , BIGINT , BIGINT , BOOLEAN )
96
98
IS ' pgr_depthFirstSearch(Single Vertex)
97
- - Undirected graph
98
99
- Parameters:
99
100
- Edges SQL with columns: id, source, target, cost [,reverse_cost]
100
101
- From root vertex identifier
101
102
- Optional parameters
102
103
- max_depth := 9223372036854775807
104
+ - directed := true
103
105
- Documentation:
104
106
- ${PGROUTING_DOC_LINK}/pgr_depthFirstSearch.html
105
107
' ;
106
108
107
- COMMENT ON FUNCTION pgr_depthFirstSearch(TEXT , ANYARRAY, BIGINT )
109
+ COMMENT ON FUNCTION pgr_depthFirstSearch(TEXT , ANYARRAY, BIGINT , BOOLEAN )
108
110
IS ' pgr_depthFirstSearch(Multiple Vertices)
109
- - Undirected graph
110
111
- Parameters:
111
112
- Edges SQL with columns: id, source, target, cost [,reverse_cost]
112
113
- From ARRAY[root vertices identifiers]
113
114
- Optional parameters
114
115
- max_depth := 9223372036854775807
116
+ - directed := true
115
117
- Documentation:
116
118
- ${PGROUTING_DOC_LINK}/pgr_depthFirstSearch.html
117
119
' ;
0 commit comments