From: Bborie Park Date: Fri, 7 Dec 2012 22:07:18 +0000 (+0000) Subject: More verbose output when constraints fail to be added to a raster X-Git-Tag: 2.1.0beta2~309 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b6117968e6e0989dec2813f8ea2ba36fb52d039a;p=postgis More verbose output when constraints fail to be added to a raster column. Ticket #2141 git-svn-id: http://svn.osgeo.org/postgis/trunk@10819 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/NEWS b/NEWS index 1482a756f..6375a03db 100644 --- 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 * diff --git a/raster/rt_pg/rtpostgis.sql.in.c b/raster/rt_pg/rtpostgis.sql.in.c index fea9c72b7..2f96a472a 100644 --- a/raster/rt_pg/rtpostgis.sql.in.c +++ b/raster/rt_pg/rtpostgis.sql.in.c @@ -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;