prefix
Prefix Range module for PostgreSQL
pg_prefix : Prefix Range module for PostgreSQL
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 3500 | prefix | pg_prefix | 1.2.11 |
TYPE | PostgreSQL | C |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --s-d-r | No | Yes | No | Yes | yes | no |
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PGDG | 1.2.11 |
18 17 16 15 14 | pg_prefix |
- |
| RPM | PGDG | 1.2.11 |
18 17 16 15 14 | prefix_$v |
- |
| DEB | PGDG | 1.2.11 |
18 17 16 15 14 | postgresql-$v-prefix |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 1.2.11 | PIGSTY 1.2.11 | PIGSTY 1.2.11 | PIGSTY 1.2.11 | PIGSTY 1.2.11 |
| el8.aarch64 | PIGSTY 1.2.11 | PIGSTY 1.2.11 | PIGSTY 1.2.11 | PIGSTY 1.2.11 | PIGSTY 1.2.11 |
| el9.x86_64 | PIGSTY 1.2.11 | PIGSTY 1.2.11 | PIGSTY 1.2.11 | PIGSTY 1.2.11 | PIGSTY 1.2.11 |
| el9.aarch64 | PIGSTY 1.2.11 | PIGSTY 1.2.11 | PIGSTY 1.2.11 | PIGSTY 1.2.11 | PIGSTY 1.2.11 |
| el10.x86_64 | PIGSTY 1.2.11 | PIGSTY 1.2.11 | PIGSTY 1.2.11 | PIGSTY 1.2.11 | PIGSTY 1.2.11 |
| el10.aarch64 | PIGSTY 1.2.11 | PIGSTY 1.2.11 | PIGSTY 1.2.11 | PIGSTY 1.2.11 | PIGSTY 1.2.11 |
| d12.x86_64 | PGDG 1.2.11 | PGDG 1.2.11 | PGDG 1.2.11 | PGDG 1.2.11 | PGDG 1.2.11 |
| d12.aarch64 | PGDG 1.2.11 | PGDG 1.2.11 | PGDG 1.2.11 | PGDG 1.2.11 | PGDG 1.2.11 |
| d13.x86_64 | PGDG 1.2.11 | PGDG 1.2.11 | PGDG 1.2.11 | PGDG 1.2.11 | PGDG 1.2.11 |
| d13.aarch64 | PGDG 1.2.11 | PGDG 1.2.11 | PGDG 1.2.11 | PGDG 1.2.11 | PGDG 1.2.11 |
| u22.x86_64 | PGDG 1.2.11 | PGDG 1.2.11 | PGDG 1.2.11 | PGDG 1.2.11 | PGDG 1.2.11 |
| u22.aarch64 | PGDG 1.2.11 | PGDG 1.2.11 | PGDG 1.2.11 | PGDG 1.2.11 | PGDG 1.2.11 |
| u24.x86_64 | PGDG 1.2.11 | PGDG 1.2.11 | PGDG 1.2.11 | PGDG 1.2.11 | PGDG 1.2.11 |
| u24.aarch64 | PGDG 1.2.11 | PGDG 1.2.11 | PGDG 1.2.11 | PGDG 1.2.11 | PGDG 1.2.11 |
| u26.x86_64 | PGDG 1.2.11 | PGDG 1.2.11 | PGDG 1.2.11 | PGDG 1.2.11 | PGDG 1.2.11 |
| u26.aarch64 | PGDG 1.2.11 | PGDG 1.2.11 | PGDG 1.2.11 | PGDG 1.2.11 | PGDG 1.2.11 |
Source
github.com/dimitri/prefix
prefix-1.2.11.tar.gz
Install
Make sure PGDG repo available:
Install this extension with pig:
Create this extension with:
Usage
The prefix extension provides a prefix_range data type for efficient prefix matching, particularly useful for telephony call routing.
Data Type
Create prefix_range values using the constructor or text casting:
Operators
| Operator | Description |
|---|---|
@> |
Contains (prefix contains value) |
<@ |
Is contained by |
&& |
Overlaps |
| |
Union |
& |
Intersection |
=, <>, <, >, <=, >= |
Comparison |
Examples
Index Support
Create a GiST index for efficient prefix lookups:
The index accelerates @>, <@, &&, and = operators.