From 531f69d6d4f30435bda6ad14603a6a6693f0fd29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Tue, 6 Apr 2021 07:23:37 +0300 Subject: [PATCH] fix default types --- IV/wm.sql | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/IV/wm.sql b/IV/wm.sql index e26d615..cf66813 100644 --- a/IV/wm.sql +++ b/IV/wm.sql @@ -265,10 +265,10 @@ drop function if exists bend_attrs; drop type if exists t_bend_attrs; create type t_bend_attrs as ( bend geometry, - area real not null default 0, - cmp real not null default 0, - adjsize real not null default 0, - baselinelength real not null default 0 + area real, + cmp real, + adjsize real, + baselinelength real ); create function bend_attrs(bends geometry[], dbgname text default null) returns setof t_bend_attrs as $$ declare @@ -282,6 +282,10 @@ begin bend = bends[i]; res = null; res.bend = bend; + res.area = 0; + res.cmp = 0; + res.adjsize = 0; + res.baselinelength = 0; if st_numpoints(bend) >= 3 then polygon = st_makepolygon(st_addpoint(bend, st_startpoint(bend))); res.baselinelength = st_distance(st_startpoint(bend), st_endpoint(bend));