range_type_functions
Functions for enhancing range type functionality.
range_type_functions · Functions for enhancing range type functionality.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 101744 | range_type_functions | range_type_functions | 0.0.4 | FUNC | PostgreSQL | SQL |
Usage
Sources:
- Official upstream README
- Official extension control file (range_type_functions.control)
- Official extension SQL (range_type_functions.sql)
- Current official source repository
range_type_functions — This extension serves two purposes: 1. Extend the capabilities of range functions, with an eye toward moving the most useful of those functions into the core. 2. Facilitate back-porting of functions from newer versions of PostgreSQL. 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
element_range_comp(element anyelement, range anyrange)is an extension function and returnssmallint.get_bound_expr(range anyrange, literal anyelement)is an extension function and returnstext.get_bounds_condition_expr(range anyrange, text default 'x')is an extension function and returnstext.get_collation_expr(range anyrange)is an extension function and returnstext.get_lower_bound_condition_expr(range anyrange, text default 'x')is an extension function and returnstext.get_subtype_element_expr(range anyrange, text default 'x')is an extension function and returnstext.get_upper_bound_condition_expr(range anyrange, text default 'x')is an extension function and returnstext.is_singleton(range anyrange)is an extension function and returnsboolean.to_range(elem anyelement, range anyrange)is an extension function and returnsanyrange.to_range(low anyelement, high anyelement, bounds text, range anyrange)is an extension function and returnsanyrange.
Requirements and Caveats
- The reviewed control file declares default version
0.0.4. - The control file marks the extension as relocatable.
- The former
moatGitHub URL is unavailable; the surviving upstream source repository is linked above. - Confirm privileges, supported PostgreSQL versions, upgrade behavior, and failure cases against the pinned source before production use.