BSD Ports

databases/postgresql-prefix 1.2.10 DragonFly

Prefix Range module for PostgreSQL

System
DragonFly
Repository
DPorts
Maintainer
[email protected] (as in FreeBSD)
License
PostgreSQL
Categories
databases
Package size
18.6 KiB, 57.3 KiB installed

Description

Prefix matching is both very common and important in telephony applications, where call routing and costs depend on matching caller/callee phone number to an operator prefix.

Let's say the prefixes table is called prefixes, a typical query will try to match a phone number to the longest prefix in the table:

SELECT * FROM prefixes WHERE prefix @> '0123456789' ORDER BY length(prefix) DESC LIMIT 1;

In the other systems

SystemPortVersion
DragonFlydatabases/postgresql-prefix1.2.10
FreeBSDdatabases/postgresql-prefix1.2.10
MidnightBSDdatabases/postgresql-prefix1.2.10_1

Install

Binary package:

pkg install postgresql16-prefix

From DPorts:

cd /usr/dports/databases/postgresql-prefix && make install clean

Dependencies

Run dependencies 1

No port depends on this one.