maya
.public
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
ot_ro_get_location(double precision, double precision, integer)
Parameters
Name
Type
Mode
in_longitude
double precision
IN
in_latitude
double precision
IN
in_iddevice
integer
IN
Definition
declare result hstore; begin PERFORM 1 FROM public.get_location_localremote WHERE isremote = true; IF FOUND THEN SELECT h INTO result FROM ot_ro_get_location_remote(in_longitude,in_latitude,in_iddevice) h; ELSE SELECT h INTO result FROM ot_ro_get_location_local(in_longitude,in_latitude,in_iddevice) h; END IF; RETURN result; EXCEPTION WHEN others THEN UPDATE get_location_localremote SET isremote = false; RETURN hstore('ciudad','ND')||hstore('estado','ND')||hstore('localidad','ND'); end;