create_funcs.sql: Remove output noise from loop_wayp_new()
[gpstools.git] / postgres / Patch / closelog.patch
bloba1e6014a0259bfad50de64fac818e1e631f837a5
1 Index: create_funcs.sql
2 ===================================================================
3 --- create_funcs.sql (revision 3096)
4 +++ create_funcs.sql (working copy)
5 @@ -31,6 +31,15 @@
6 ) AS s;
7 $$ LANGUAGE SQL; -- }}}
9 +-- closelog(): Lister ut de nærmeste punktene i loggen for et koordinat
10 +CREATE OR REPLACE FUNCTION closelog(point) RETURNS void -- {{{
11 +AS $$
12 +BEGIN
13 + PERFORM (point($1) <-> coor)::numeric(8,5) AS distance, *
14 + FROM logg ORDER BY distance LIMIT 100;
15 +END;
16 +$$ LANGUAGE plpgsql; -- }}}
18 -- findpos(): Beregn koordinater for et tidspunkt som ligger mellom to trackpunkter.
19 CREATE OR REPLACE FUNCTION findpos(currtime timestamptz) RETURNS point AS $$ -- {{{
20 DECLARE