mirror of
https://github.com/xbgmsharp/postgsail.git
synced 2025-09-17 19:27:49 +00:00
Limit scope of process functions
This commit is contained in:
@@ -61,12 +61,15 @@ AS $vessel$
|
|||||||
longitude,latitude,
|
longitude,latitude,
|
||||||
st_makepoint(longitude,latitude) AS geo_point
|
st_makepoint(longitude,latitude) AS geo_point
|
||||||
FROM public.last_metric
|
FROM public.last_metric
|
||||||
WHERE latitude IS NOT NULL
|
WHERE
|
||||||
|
latitude IS NOT NULL
|
||||||
AND longitude IS NOT NULL
|
AND longitude IS NOT NULL
|
||||||
|
AND client_id LIKE '%' || current_setting('vessel.mmsi', false)
|
||||||
)
|
)
|
||||||
) AS t
|
) AS t
|
||||||
) AS geojson_t
|
) AS geojson_t
|
||||||
WHERE v.mmsi = current_setting('vessel.mmsi')
|
WHERE
|
||||||
|
m.mmsi = current_setting('vessel.mmsi')
|
||||||
AND m.mmsi = v.mmsi;
|
AND m.mmsi = v.mmsi;
|
||||||
--RAISE notice 'api.vessel_fn %', obj;
|
--RAISE notice 'api.vessel_fn %', obj;
|
||||||
END;
|
END;
|
||||||
|
Reference in New Issue
Block a user