]> granicus.if.org Git - postgis/commitdiff
Additional tweaks for the NODATA values constraint. Continues changes made in r8691.
authorBborie Park <bkpark at ucdavis.edu>
Sat, 7 Jan 2012 14:05:47 +0000 (14:05 +0000)
committerBborie Park <bkpark at ucdavis.edu>
Sat, 7 Jan 2012 14:05:47 +0000 (14:05 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8694 b70326c6-7e19-0410-871a-916f4a2858ee

raster/rt_pg/rtpostgis.sql.in.c

index 4f2774a6098ac112e49fa749aaaf631f906f61d9..68a78f98cb75bf9037c4a6d744e3f5fe76b3571b 100644 (file)
@@ -4181,7 +4181,11 @@ CREATE OR REPLACE FUNCTION _add_raster_constraint_nodata_values(rastschema name,
                        || ' CHECK (_raster_constraint_nodata_values(' || quote_ident($3)
                        || ')::numeric(16,10)[] = ''{';
                FOR x in 1..max LOOP
-                       sql := sql || attr[x];
+                       IF attr[x] IS NULL THEN
+                               sql := sql || 'NULL';
+                       ELSE
+                               sql := sql || attr[x];
+                       END IF;
                        IF x < max THEN
                                sql := sql || ',';
                        END IF;