From: Nicklas Avén Date: Tue, 6 Aug 2013 19:19:50 +0000 (+0000) Subject: #2405 fix handling of the newer create aggregate syntax X-Git-Tag: 2.2.0rc1~1424 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9e0fc93f08e410d98e3709ebe8a6d6783a4b3992;p=postgis #2405 fix handling of the newer create aggregate syntax git-svn-id: http://svn.osgeo.org/postgis/trunk@11740 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/utils/postgis_proc_upgrade.pl b/utils/postgis_proc_upgrade.pl index 7dcd9e2b2..99bcbe544 100755 --- a/utils/postgis_proc_upgrade.pl +++ b/utils/postgis_proc_upgrade.pl @@ -227,7 +227,16 @@ while() $aggtype = $1 if ( /basetype\s*=\s*([^,]*)\s*,/i ); last if /\);/; } - print "DROP AGGREGATE IF EXISTS $aggname($aggtype);\n"; + if ($aggtype=='unknown') + { + #For the new aggregate syntax where the parameters is defined like a common function + print "DROP AGGREGATE IF EXISTS $aggname;\n"; + } + else + { + #For the old syntax when the parameter is defined through "basetype" + print "DROP AGGREGATE IF EXISTS $aggname($aggtype);\n"; + } print $def; }