pg-libphonenumber/sql/regression.sql

14 lines
555 B
MySQL
Raw Normal View History

2015-07-30 18:19:20 +00:00
CREATE EXTENSION IF NOT EXISTS pg_libphonenumber;
--Test phone number parsing
select parse_packed_phone_number('555-555-5555', 'US');
2015-07-30 18:19:20 +00:00
--These two should produce errors because the number is too long.
2015-11-19 23:47:25 +00:00
--Produces an error in pg-libphonenumber's code
select parse_packed_phone_number('555-555-5555555555', 'US');
2015-11-19 23:47:25 +00:00
--Produces an error from libphonenumber
select parse_packed_phone_number('555-555-55555555555', 'US');
2015-07-30 18:19:20 +00:00
-- Do we get correct country codes?
-- TODO: expand.
select phone_number_country_code(parse_packed_phone_number('+1-555-555-5555', 'USA'));