git-svn-id: http://svn.osgeo.org/postgis/branches/pgis_1_0@2005
b70326c6-7e19-0410-871a-
916f4a2858ee
use strict;
-($#ARGV == 0) || die "Usage: perl postgis_funxupgrade.pl <postgis.sql>\nCreates a new SQL script to upgrade all of the PostGIS functions.\n";
+($#ARGV == 0) ||
+die "Usage: perl postgis_funxupgrade.pl <postgis.sql> [<schema>]\nCreates a new SQL script to upgrade all of the PostGIS functions.\n"
+ if ( @ARGV < 1 || @ARGV > 2 );
my $NEWVERSION = "UNDEF";
print "BEGIN;\n";
+print "SET search_path TO $ARGV[1];\n" if @ARGV>1;
+
open( INPUT, $ARGV[0] ) || die "Couldn't open file: $ARGV[0]\n";
FUNC: