2015-11-11 22:38:18 +08:00
|
|
|
-- Check that the public function is callable, even with no data
|
|
|
|
-- It should return NULL
|
2015-11-11 22:43:11 +08:00
|
|
|
SELECT cdb_geocoder_server.geocode_ip_point(session_user, txid_current(), '0.0.0.0');
|
2015-11-11 22:38:18 +08:00
|
|
|
geocode_ip_point
|
|
|
|
------------------
|
|
|
|
|
|
|
|
(1 row)
|
|
|
|
|
|
|
|
-- Insert dummy data into ip_address_locations
|
2015-11-12 00:48:08 +08:00
|
|
|
INSERT INTO ip_address_locations VALUES ('::ffff:0.0.0.0'::inet, (ST_SetSRID(ST_MakePoint('40.40', '3.71'), 4326)));
|
2015-11-11 22:38:18 +08:00
|
|
|
-- This should return the polygon inserted above
|
2015-11-11 22:43:11 +08:00
|
|
|
SELECT cdb_geocoder_server.geocode_ip_point(session_user, txid_current(), '0.0.0.0');
|
2015-11-11 22:38:18 +08:00
|
|
|
geocode_ip_point
|
|
|
|
----------------------------------------------------
|
|
|
|
0101000020E61000003333333333334440AE47E17A14AE0D40
|
|
|
|
(1 row)
|
|
|
|
|