Go to file
Evan Carroll dcb98bede6 Links, Installation Notes, and Synopsis (#2)
* Linked to project

* Updated with install instructions

Install and synopsis.

* Update README.md
2017-02-18 16:17:44 -08:00
expected Fixed various errors 2015-11-19 15:47:25 -08:00
sql Fixed various errors 2015-11-19 15:47:25 -08:00
tools Moved get_sizeof_phonenumber to a subdirectory 2015-07-22 15:14:05 -05:00
.gitignore Started writing basic regression tests 2015-07-30 13:19:20 -05:00
Makefile Started writing basic regression tests 2015-07-30 13:19:20 -05:00
README.md Links, Installation Notes, and Synopsis (#2) 2017-02-18 16:17:44 -08:00
error_handling.cpp Fixed various errors 2015-11-19 15:47:25 -08:00
error_handling.h Adjusted error handling 2015-07-24 16:22:04 -05:00
mask.h Moved include to correct header 2015-07-27 15:52:38 -05:00
pg_libphonenumber.control Added default extension version 2015-07-23 16:08:10 -05:00
pg_libphonenumber.cpp Adjusted file permissions 2015-10-13 10:51:13 -05:00
pg_libphonenumber.sql.template Finished b-tree index support 2015-07-24 14:48:22 -05:00
short_phone_number.cpp Improved formatting of PhoneNumberTooLongException 2015-07-28 16:11:44 -05:00
short_phone_number.h Improved formatting of PhoneNumberTooLongException 2015-07-28 16:11:44 -05: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. Do not use it in production environments.

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