Components - Family of functions

Previous versions of this page

  • Supported versions: current(3.0) 2.6

  • Unsupported versions: 2.5

Parameters

Parameter

Type

Default

Description

Edges SQL

TEXT

Inner query as described below.

Inner query

Edges SQL

an SQL query which should return a set of rows with the following columns:

Column

Type

Default

Description

id

ANY-INTEGER

Identifier of the edge.

source

ANY-INTEGER

Identifier of the first end point vertex of the edge.

target

ANY-INTEGER

Identifier of the second end point vertex of the edge.

cost

ANY-NUMERICAL

Weight of the edge (source, target)

  • When negative: edge (source, target) does not exist, therefore it’s not part of the graph.

reverse_cost

ANY-NUMERICAL

-1

Weight of the edge (target, source),

  • When negative: edge (target, source) does not exist, therefore it’s not part of the graph.

Where:

ANY-INTEGER

SMALLINT, INTEGER, BIGINT

ANY-NUMERICAL

SMALLINT, INTEGER, BIGINT, REAL, FLOAT

Result Columns

pgr_connectedComponents & pgr_strongComponents

Returns set of (seq, component, node)

Column

Type

Description

seq

BIGINT

Sequential value starting from 1.

component

BIGINT

Component identifier. It is equal to the minimum node identifier in the component.

node

BIGINT

Identifier of the vertex that belongs to component.

pgr_biconnectedComponents

Returns set of (seq, component, edge)

Column

Type

Description

seq

BIGINT

Sequential value starting from 1.

component

BIGINT

Component identifier. It is equal to the minimum edge identifier in the component.

edge

BIGINT

Identifier of the edge.

pgr_articulationPoints

Returns set of (node)

Column

Type

Description

node

BIGINT

Identifier of the vertex.

pgr_bridges

Returns set of (edge)

Column

Type

Description

edge

BIGINT

Identifier of the edge that is a bridge.

See Also

Indices and tables