print "Upgrade path: ${OPT_UPGRADE_FROM} --> ${OPT_UPGRADE_TO}\n";
}
+if ( $OPT_EXTENSIONS )
+{
+ $OPT_WITH_RASTER = 1; # implied
+}
+
##################################################################
my $psql_opts = "--no-psqlrc --variable ON_ERROR_STOP=true";
my $sql = "CREATE EXTENSION postgis";
if ( $OPT_UPGRADE_FROM ) {
+ if ( $OPT_UPGRADE_FROM eq "unpackaged" ) {
+ prepare_spatial();
+ return;
+ }
$sql .= " VERSION '" . $OPT_UPGRADE_FROM . "'";
}
my $nextver = $OPT_UPGRADE_TO ? "${OPT_UPGRADE_TO}" : "${libver}next";
my $sql = "ALTER EXTENSION postgis UPDATE TO '${nextver}'";
+ if ( $OPT_UPGRADE_FROM eq "unpackaged" ) {
+ $sql = "CREATE EXTENSION postgis VERSION '${nextver}' FROM unpackaged";
+ }
+
print "Upgrading PostGIS in '${DB}' using: ${sql}\n" ;
my $cmd = "psql $psql_opts -c \"" . $sql . "\" $DB >> $REGRESS_LOG 2>&1";