if ( $OPT_WITH_RASTER )
{
- $query = "insert into upgrade_test(r) ";
- $query .= "select ST_AddBand(ST_MakeEmptyRaster(10, 10, 1, 1, 2, 2, 0, 0,4326), 1, '8BSI'::text, -129, NULL);";
- $query .= "set client_min_messages to error; select AddRasterConstraints('upgrade_test', 'r')";
+ $query = "UPDATE upgrade_test SET r = ";
+ $query .= " ST_AddBand(ST_MakeEmptyRaster(10, 10, 1, 1, 2, 2, 0, 0,4326), 1, '8BSI'::text, -129, NULL);";
+ $ret = sql($query);
+ unless ( $ret =~ /^UPDATE/ ) {
+ `dropdb $DB`;
+ print "\nSomething went wrong setting raster into upgrade_test table: $ret.\n";
+ exit(1);
+ }
+
+ $query = "set client_min_messages to error; select AddRasterConstraints('upgrade_test', 'r')";
$ret = sql($query);
unless ( $ret =~ /^t$/ ) {
`dropdb $DB`;