https://github.com/blm768/pg-libphonenumber
A (partially implemented!) PostgreSQL extension that provides access to Google's libphonenumber
https://github.com/blm768/pg-libphonenumber
google-libphonenumber postgresql-extension
Last synced: 5 months ago
JSON representation
A (partially implemented!) PostgreSQL extension that provides access to Google's libphonenumber
- Host: GitHub
- URL: https://github.com/blm768/pg-libphonenumber
- Owner: blm768
- License: apache-2.0
- Created: 2015-07-14T19:32:21.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2020-02-11T06:07:05.000Z (about 5 years ago)
- Last Synced: 2024-08-03T22:18:13.253Z (8 months ago)
- Topics: google-libphonenumber, postgresql-extension
- Language: C++
- Homepage:
- Size: 119 KB
- Stars: 93
- Watchers: 12
- Forks: 7
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - blm768/pg-libphonenumber - A (partially implemented!) PostgreSQL extension that provides access to Google's libphonenumber (C++)
README
# `pg_libphonenumber`
A (partially implemented!) PostgreSQL extension that provides access to
[Google's `libphonenumber`](https://github.com/googlei18n/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
```sql
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.```shell-script
sudo apt-get update && sudo apt-get install \
build-essential \
postgresql-server-dev-9.6 \
libphonenumber-dev
```Then clone this repository and build.
```shell-script
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.