Go to file
Ben Merritt c73715bd65 Started building Docker test environment 2017-03-13 19:11:05 +00:00
expected Fixed various errors 2015-11-19 15:47:25 -08:00
sql Reorganized code 2017-03-13 19:04:26 +00:00
src Reorganized code 2017-03-13 19:04:26 +00:00
.gitignore Reorganized code 2017-03-13 19:04:26 +00:00
Dockerfile Started building Docker test environment 2017-03-13 19:11:05 +00:00
LICENSE Added license 2017-02-18 17:50:34 +00:00
META.json Added META.json 2017-02-20 00:48:53 +00:00
Makefile Reorganized code 2017-03-13 19:04:26 +00:00
README.md Reorganized source files 2017-02-18 17:46:11 +00:00
docker-entrypoint.patch Started building Docker test environment 2017-03-13 19:11:05 +00:00
pg_libphonenumber.control Reorganized source files 2017-02-18 17:46:11 +00:00
run-tests.sh Started building Docker test environment 2017-03-13 19:11:05 +00:00

README.md

pg-libphonenumber

A (partially implemented!) PostgreSQL extension that provides access to Google's libphonenumber

Project status

This extension is in an alpha state. It's not complete or tested enough for critical production deployments, but with a little help, we should be able to get it there.

Synopsis

CREATE EXTENSION pg_libphonenumber;
SELECT parse_phone_number('03 7010 1234', 'AU');
SELECT parse_phone_number('2819010011', 'US');

CREATE TABLE foo ( ph phone_number );

-- DO NOT RELY ON THIS
-- may not always this work way with implicit cast.
SELECT '2819010011'::phone_number; -- assumes US

Installation

Debian/Ubuntu

First you need install libphonenumber-dev and the corresponding postgresql-server-dev package.

sudo apt-get install build-essential
sudo apt-get install postgresql-server-dev-9.5
sudo apt-get install libphonenumber-dev

Then clone this repostiroy

cd /tmp
git clone https://github.com/blm768/pg-libphonenumber
cd pg-libphonenumber
make
sudo make install