graph_component
Compute graph components
graph_component · Compute graph components
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 101389 | graph_component | graph_component | 1.0.0 | FUNC | MIT | C |
Usage
Sources:
- Official upstream README
- Official extension control file (graph_component.control)
- Official extension SQL (graph_component–1.0.0.sql)
graph_component — It is very hard to compute graph components on pure PostgreSQL. With this extension you can do this very efficiently. Extension does this on pointers using a minimal amount of RAM. This allows you to build components of hundreds of thousands of vertices based on many millions of pairs in seconds. Use it when SQL needs these specialized functions or aggregates. Use the pinned upstream revision linked above as the API boundary and test it on the target PostgreSQL build.
Core Workflow
Install the extension in the intended database, run the smallest upstream example above when available, and verify the installed version and returned values before integrating it into application SQL.
Important Objects
get_component(state graph_component_hashmap)is an extension function and returnsSETOF int4.get_component_id(state graph_component_hashmap)is an extension function and returnsTABLE.graph_components_final(state internal)is an extension function and returnsgraph_component_hashmap.graph_components_step_arr(state internal, vertex int[])is an extension function and returnsinternal.graph_componentsis an aggregate exposed by the extension.graph_component_hashmapis an extension-defined type.
Requirements and Caveats
- The reviewed control file declares default version
1.0.0. - The control file marks the extension as relocatable.
- Confirm privileges, supported PostgreSQL versions, upgrade behavior, and failure cases against the pinned source before production use.