Use double precision as numeric type
As shown in the tests, that type has the flexibility of being able to be cast to from any other numeric type. This gives us flexibility without bloating the API with lots of type-specific functions.
This commit is contained in:
parent
e123079e92
commit
074234b8da
@ -42,7 +42,7 @@
|
||||
- name: cdb_geocode_postalcode_polygon
|
||||
return_type: Geometry
|
||||
params:
|
||||
- { name: postal_code, type: integer}
|
||||
- { name: postal_code, type: double precision}
|
||||
- { name: country_name, type: text}
|
||||
|
||||
- name: cdb_geocode_postalcode_point
|
||||
@ -54,7 +54,7 @@
|
||||
- name: cdb_geocode_postalcode_point
|
||||
return_type: Geometry
|
||||
params:
|
||||
- { name: postal_code, type: integer}
|
||||
- { name: postal_code, type: double precision}
|
||||
- { name: country_name, type: text}
|
||||
|
||||
- name: cdb_geocode_ipaddress_point
|
||||
|
@ -1,4 +1,4 @@
|
||||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_postalcode_point(username text, orgname text, code integer)
|
||||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_postalcode_point(username text, orgname text, code double precision)
|
||||
RETURNS Geometry AS $$
|
||||
SELECT cdb_dataservices_server.cdb_geocode_postalcode_point(username, orgname, code::text);
|
||||
$$ LANGUAGE SQL;
|
||||
@ -40,7 +40,7 @@ RETURNS Geometry AS $$
|
||||
$$ LANGUAGE plpythonu;
|
||||
|
||||
|
||||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_postalcode_point(username text, orgname text, code integer, country text)
|
||||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_postalcode_point(username text, orgname text, code double precision, country text)
|
||||
RETURNS Geometry AS $$
|
||||
SELECT cdb_dataservices_server.cdb_geocode_postalcode_point(username, orgname, code::text, country)
|
||||
$$ LANGUAGE SQL;
|
||||
@ -82,7 +82,7 @@ RETURNS Geometry AS $$
|
||||
$$ LANGUAGE plpythonu;
|
||||
|
||||
|
||||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_postalcode_polygon(username text, orgname text, code integer)
|
||||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_postalcode_polygon(username text, orgname text, code double precision)
|
||||
RETURNS Geometry AS $$
|
||||
SELECT cdb_dataservices_server.cdb_geocode_postalcode_polygon(username, orgname, code::text)
|
||||
$$ LANGUAGE SQL;
|
||||
@ -124,7 +124,7 @@ RETURNS Geometry AS $$
|
||||
$$ LANGUAGE plpythonu;
|
||||
|
||||
|
||||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_postalcode_polygon(username text, orgname text, code integer, country text)
|
||||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_postalcode_polygon(username text, orgname text, code double precision, country text)
|
||||
RETURNS Geometry AS $$
|
||||
SELECT cdb_dataservices_server.cdb_geocode_postalcode_polygon(username, orgname, code::text, country)
|
||||
$$ LANGUAGE SQL;
|
||||
|
Loading…
Reference in New Issue
Block a user