]> granicus.if.org Git - postgis/commitdiff
More work on 1.4 upgrade script.
authorPaul Ramsey <pramsey@cleverelephant.ca>
Tue, 9 Jun 2009 22:51:14 +0000 (22:51 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Tue, 9 Jun 2009 22:51:14 +0000 (22:51 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@4158 b70326c6-7e19-0410-871a-916f4a2858ee

utils/postgis_proc_upgrade.pl

index 1c02ad38be0571f307381366535aef35d4a99434..c50648c85d03a880853d23258bc2b48367b4ff43 100755 (executable)
@@ -98,7 +98,7 @@ while(<INPUT>)
        # in old postgis installations, thus we avoid this until we
        # find a better strategy.
 
-       if (m/^create aggregate (.*) *\(/i)
+       if (/^create aggregate\s+(\S+)\s*\(/i)
        {
                my $aggname = $1;
                my $basetype = 'unknown';
@@ -106,7 +106,7 @@ while(<INPUT>)
                while(<INPUT>)
                {
                        $def .= $_;
-                       $basetype = $1 if (m/basetype *= *([^,]*) *,/i);
+                       $basetype = $1 if (m/basetype\s*=\s*([^,]*)\s*,/i);
                        last if m/\);/;
                }
                print "DROP AGGREGATE IF EXISTS $aggname($basetype);\n";