Go to file
jordi fita mas 216c740b68 Fix architecture from all to any 2023-01-25 00:57:56 +01:00
.vscode Update VS Code configuration 2019-07-22 23:14:01 -07:00
debian Fix architecture from all to any 2023-01-25 00:57:56 +01:00
docker Make test script print regression diffs 2019-07-30 23:05:50 -07:00
expected Rename phone_number to packed_phone_number 2019-07-30 23:06:24 -07:00
sql Rename phone_number to packed_phone_number 2019-07-30 23:06:24 -07:00
src Change error code for PhoneNumberTooLongException 2019-08-06 23:10:32 -07:00
.dockerignore Update ignore files 2019-07-22 23:14:04 -07:00
.gitignore Update ignore files 2019-07-22 23:14:04 -07:00
LICENSE Added license 2017-02-18 17:50:34 +00:00
META.json Fixed license 2017-03-15 20:02:59 +00:00
Makefile Fix makefile - add /usr/local/include to CPP_FLAGS (#11) 2020-02-10 22:07:03 -08:00
README.md Rename phone_number to packed_phone_number 2019-07-30 23:06:24 -07:00
pg_libphonenumber.control Reorganized source files 2017-02-18 17:46:11 +00:00
run-tests.sh Fix permissions of test scripts 2019-07-22 23:13:57 -07: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_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.