]> granicus.if.org Git - postgis/commitdiff
More verbose output when constraints fail to be added to a raster
authorBborie Park <bkpark at ucdavis.edu>
Fri, 7 Dec 2012 22:07:18 +0000 (22:07 +0000)
committerBborie Park <bkpark at ucdavis.edu>
Fri, 7 Dec 2012 22:07:18 +0000 (22:07 +0000)
column. Ticket #2141

git-svn-id: http://svn.osgeo.org/postgis/trunk@10819 b70326c6-7e19-0410-871a-916f4a2858ee

NEWS
raster/rt_pg/rtpostgis.sql.in.c

diff --git a/NEWS b/NEWS
index 1482a756f4ea3c6b3c739a8f1c84449c5895d927..6375a03db378312fe6dbf5552b8d32d484728584 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -98,6 +98,8 @@ PostGIS 2.1.0
     reference raster
   - #2119, Rasters passed to ST_Resample(), ST_Rescale(), ST_Reskew(),
     and ST_SnapToGrid() no longer require an SRID
+  - #2141, More verbose output when constraints fail to be added
+    to a raster column
 
 * Fixes *
 
index fea9c72b781460629a5d11f55be8583f830e8af3..2f96a472afcd8fff5e3ad7ff27ed692710ab6b0f 100644 (file)
@@ -6055,7 +6055,9 @@ CREATE OR REPLACE FUNCTION _add_raster_constraint(cn name, sql text)
                        WHEN duplicate_object THEN
                                RAISE NOTICE 'The constraint "%" already exists.  To replace the existing constraint, delete the constraint and call ApplyRasterConstraints again', cn;
                        WHEN OTHERS THEN
-                               RAISE NOTICE 'Unable to add constraint "%"', cn;
+                               RAISE NOTICE 'Unable to add constraint: %', cn;
+                               RAISE NOTICE 'SQL used for failed constraint: %', sql;
+                               RAISE NOTICE 'Returned error message: %', SQLERRM;
                                RETURN FALSE;
                END;