From 8b336f6f9bc702fa877c3ad2b538bea1ff917c19 Mon Sep 17 00:00:00 2001 From: xbgmsharp Date: Mon, 9 Oct 2023 16:22:30 +0200 Subject: [PATCH] Add explicit schema when public --- initdb/02_3_2_signalk_public_functions.sql | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/initdb/02_3_2_signalk_public_functions.sql b/initdb/02_3_2_signalk_public_functions.sql index f5143c4..ec7bdfb 100644 --- a/initdb/02_3_2_signalk_public_functions.sql +++ b/initdb/02_3_2_signalk_public_functions.sql @@ -15,7 +15,7 @@ CREATE SCHEMA IF NOT EXISTS public; -- process single cron event, process_[logbook|stay|moorage]_queue_fn() -- -CREATE OR REPLACE FUNCTION logbook_metrics_dwithin_fn( +CREATE OR REPLACE FUNCTION public.logbook_metrics_dwithin_fn( IN _start text, IN _end text, IN lgn float, @@ -44,7 +44,7 @@ COMMENT ON FUNCTION -- Update a logbook with avg data -- TODO using timescale function -CREATE OR REPLACE FUNCTION logbook_update_avg_fn( +CREATE OR REPLACE FUNCTION public.logbook_update_avg_fn( IN _id integer, IN _start TEXT, IN _end TEXT, @@ -74,8 +74,8 @@ COMMENT ON FUNCTION -- Create a LINESTRING for Geometry -- Todo validate st_length unit? -- https://postgis.net/docs/ST_Length.html -DROP FUNCTION IF EXISTS logbook_update_geom_distance_fn; -CREATE FUNCTION logbook_update_geom_distance_fn(IN _id integer, IN _start text, IN _end text, +DROP FUNCTION IF EXISTS public.logbook_update_geom_distance_fn; +CREATE FUNCTION public.logbook_update_geom_distance_fn(IN _id integer, IN _start text, IN _end text, OUT _track_geom Geometry(LINESTRING), OUT _track_distance double precision ) AS $logbook_geo_distance$ @@ -109,7 +109,7 @@ COMMENT ON FUNCTION IS 'Update logbook details with geometry data an distance, ST_Length in Nautical Mile (international)'; -- Create GeoJSON for api consume. -CREATE FUNCTION logbook_update_geojson_fn(IN _id integer, IN _start text, IN _end text, +CREATE FUNCTION public.logbook_update_geojson_fn(IN _id integer, IN _start text, IN _end text, OUT _track_geojson JSON ) AS $logbook_geojson$ declare @@ -195,7 +195,7 @@ AS $logbook_update_gpx$ RAISE WARNING '-> logbook_update_gpx_fn invalid logbook %', _id; RETURN; END IF; - -- Gathe url from app settings + -- Gather url from app settings app_settings := get_app_settings_fn(); --RAISE DEBUG '-> logbook_update_gpx_fn app_settings %', app_settings; -- Generate XML