freebsd-ports/databases/postgresql-prefix/pkg-descr
Kai Knoblich 3cb9f060c3 databases/postgresql-prefix: Update to 1.2.9
* Pet portlint by fixing whitespace issues in pkg-plist while I'm here.

Changelog:

* Add support for PostgreSQL 12

PR:		239452
Submitted by:	lbartoletti <lbartoletti@tuxfamily.org> (maintainer)
2019-07-28 16:13:28 +00:00

13 lines
444 B
Text

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;
WWW: https://github.com/dimitri/prefix