Revision 7672
Added by Aaron Marcuse-Kubitza almost 12 years ago
schemas/vegbien.my.sql | ||
---|---|---|
193 | 193 |
|
194 | 194 |
|
195 | 195 |
-- |
196 |
-- Name: _dms_to_dd(double precision, double precision, double precision); Type: FUNCTION; Schema: public; Owner: - |
|
197 |
-- |
|
198 |
|
|
199 |
|
|
200 |
|
|
201 |
|
|
202 |
-- |
|
203 | 196 |
-- Name: _fraction_to_percent(double precision); Type: FUNCTION; Schema: public; Owner: - |
204 | 197 |
-- |
205 | 198 |
|
schemas/functions.sql | ||
---|---|---|
73 | 73 |
|
74 | 74 |
|
75 | 75 |
-- |
76 |
-- Name: _dms_to_dd(double precision, double precision, double precision); Type: FUNCTION; Schema: functions; Owner: - |
|
77 |
-- |
|
78 |
|
|
79 |
CREATE FUNCTION _dms_to_dd(deg double precision DEFAULT NULL::double precision, min double precision DEFAULT NULL::double precision, sec double precision DEFAULT NULL::double precision) RETURNS double precision |
|
80 |
LANGUAGE sql IMMUTABLE |
|
81 |
AS $_$ |
|
82 |
SELECT sum(value) |
|
83 |
FROM |
|
84 |
(VALUES |
|
85 |
($1) |
|
86 |
, ($2/60) |
|
87 |
, ($3/60/60) |
|
88 |
) |
|
89 |
AS v (value) |
|
90 |
$_$; |
|
91 |
|
|
92 |
|
|
93 |
-- |
|
76 | 94 |
-- Name: _eq(anyelement, anyelement); Type: FUNCTION; Schema: functions; Owner: - |
77 | 95 |
-- |
78 | 96 |
|
schemas/vegbien.sql | ||
---|---|---|
418 | 418 |
|
419 | 419 |
|
420 | 420 |
-- |
421 |
-- Name: _dms_to_dd(double precision, double precision, double precision); Type: FUNCTION; Schema: public; Owner: - |
|
422 |
-- |
|
423 |
|
|
424 |
CREATE FUNCTION _dms_to_dd(deg double precision DEFAULT NULL::double precision, min double precision DEFAULT NULL::double precision, sec double precision DEFAULT NULL::double precision) RETURNS double precision |
|
425 |
LANGUAGE sql IMMUTABLE |
|
426 |
AS $_$ |
|
427 |
SELECT sum(value) |
|
428 |
FROM |
|
429 |
(VALUES |
|
430 |
($1) |
|
431 |
, ($2/60) |
|
432 |
, ($3/60/60) |
|
433 |
) |
|
434 |
AS v (value) |
|
435 |
$_$; |
|
436 |
|
|
437 |
|
|
438 |
-- |
|
439 | 421 |
-- Name: _fraction_to_percent(double precision); Type: FUNCTION; Schema: public; Owner: - |
440 | 422 |
-- |
441 | 423 |
|
Also available in: Unified diff
Moved _dms_to_dd() from schemas/vegbien.sql to schemas/functions.sql so it can use functions schema functions