]> granicus.if.org Git - postgis/commitdiff
Added optional second argument to specify schema in which postgis functions are to...
authorSandro Santilli <strk@keybit.net>
Wed, 26 Oct 2005 11:08:15 +0000 (11:08 +0000)
committerSandro Santilli <strk@keybit.net>
Wed, 26 Oct 2005 11:08:15 +0000 (11:08 +0000)
git-svn-id: http://svn.osgeo.org/postgis/branches/pgis_1_0@2005 b70326c6-7e19-0410-871a-916f4a2858ee

utils/postgis_proc_upgrade.pl

index eec853a1a4af2203b2af0c3d7a05f38b9aae3876..c534c998093cb81d922ddfa3f7edda9a05d2f3d1 100755 (executable)
@@ -5,12 +5,16 @@ eval "exec perl -w $0 $@"
 
 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: