Skip to content

Commit 1470395

Browse files
committed
ti.getanalysisunitbyid fix applied. Returns double precision.
Issue #8 indicated that depth and thickness were being returned as integers. This was a result of the typecast to `numeric` apparently. Keeping the type as a double precision (float).
1 parent b638b96 commit 1470395

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
CREATE OR REPLACE FUNCTION ti.getanalysisunitbyid(_analunitid integer)
2-
RETURNS TABLE(collectionunitid integer, analysisunitname character varying, depth numeric, thickness numeric)
2+
RETURNS TABLE(collectionunitid integer,
3+
analysisunitname character varying,
4+
depth double precision,
5+
thickness double precision)
36
LANGUAGE sql
47
AS $function$
58
SELECT au.collectionunitid,
69
au.analysisunitname,
7-
au.depth::numeric,
8-
au.thickness::numeric
10+
au.depth,
11+
au.thickness
912
FROM ndb.analysisunits AS au
1013
WHERE analysisunitid = _analunitid;
1114
$function$

0 commit comments

Comments
 (0)