Skip to content
A (partially implemented!) PostgreSQL extension that provides access to Google's libphonenumber
C++ Makefile Dockerfile Shell
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode Update VS Code configuration Jul 23, 2019
docker Make test script print regression diffs Jul 31, 2019
expected
sql Rename phone_number to packed_phone_number Jul 31, 2019
src Change error code for PhoneNumberTooLongException Aug 7, 2019
.dockerignore Update ignore files Jul 23, 2019
.gitignore Update ignore files Jul 23, 2019
LICENSE Added license Feb 18, 2017
META.json Fixed license Mar 15, 2017
Makefile Clean up code somewhat Jul 23, 2019
README.md Rename phone_number to packed_phone_number Jul 31, 2019
pg_libphonenumber.control Reorganized source files Feb 18, 2017
run-tests.sh Fix permissions of test scripts Jul 23, 2019

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_packed_phone_number('03 7010 1234', 'AU');
SELECT parse_packed_phone_number('2819010011', 'US');

CREATE TABLE foo ( ph packed_phone_number );

Installation

Debian/Ubuntu

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

sudo apt-get update && sudo apt-get install \
    build-essential \
    postgresql-server-dev-9.6 \
    libphonenumber-dev

Then clone this repository and build.

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

Running tests

For convenience, we provide a Docker image that sets up a test environment. Run the script ./run-tests.sh to build and run the image.

You can’t perform that action at this time.