pgr_bridges
¶
pgr_bridges
 Return the bridges of an undirected graph.
Availability
Version 3.0.0
Result columns change:
seq
is removedOfficial function
Version 2.5.0
New experimental function
Description¶
A bridge is an edge of an undirected graph whose deletion increases its number of connected components. This implementation can only be used with an undirected graph.
The main characteristics are:
Works for undirected graphs.
The returned values are ordered:
edge
ascending
Running time: \(O(E * (V + E))\)
Signatures¶
(edge)
 Example:
The bridges of the graph
SELECT * FROM pgr_bridges(
'SELECT id, source, target, cost, reverse_cost FROM edges'
);
edge

1
6
7
14
17
18
(6 rows)
Parameters¶
Parameter 
Type 
Description 


Edges SQL as described below. 
Inner Queries¶
Edges SQL¶
Column 
Type 
Default 
Description 


ANYINTEGER 
Identifier of the edge. 


ANYINTEGER 
Identifier of the first end point vertex of the edge. 


ANYINTEGER 
Identifier of the second end point vertex of the edge. 


ANYNUMERICAL 
Weight of the edge ( 


ANYNUMERICAL 
1 
Weight of the edge (

Where:
 ANYINTEGER:
SMALLINT
,INTEGER
,BIGINT
 ANYNUMERICAL:
SMALLINT
,INTEGER
,BIGINT
,REAL
,FLOAT
Result columns¶
Returns set of (edge)
Column 
Type 
Description 



Identifier of the edge that is a bridge. 
See Also¶
The queries use the Sample Data network.
Indices and tables