From: Sandro Santilli Date: Sat, 22 Feb 2014 16:48:43 +0000 (+0000) Subject: Print warning on missing last updated info in aggregates X-Git-Tag: 2.2.0rc1~1246 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=293224833b37e3d5f35a36f731ba4f4437243438;p=postgis Print warning on missing last updated info in aggregates git-svn-id: http://svn.osgeo.org/postgis/trunk@12246 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/utils/postgis_proc_upgrade.pl b/utils/postgis_proc_upgrade.pl index c8822d3e8..fb05e3eeb 100755 --- a/utils/postgis_proc_upgrade.pl +++ b/utils/postgis_proc_upgrade.pl @@ -291,10 +291,13 @@ while() my $aggsig = "$aggname($aggtype)"; #print "-- Checking comment $comment\n"; - $comment =~ m/.*(?:Availability|Changed):\s([^\.])\.([^.]*)/s; - my $last_updated = $1*100 + $2; + my $last_updated = 0; + if ( $comment =~ m/.*(?:Availability|Changed):\s([^\.])\.([^.]*)/s ) { + $last_updated = $1*100 + $2; + } if ( ! $last_updated ) { + print STDERR "WARNING: no last updated info for aggregate '${aggsig}'\n"; my $ver = $version_from_num + 1; while( $version_from_num < $version_to_num && $ver <= $version_to_num ) { @@ -306,7 +309,7 @@ while() $ver++; } } - print "-- Checking ${aggsig} -- LastUpdated: ${last_updated} -- From: ${version_from_num} -- To: ${version_to_num}\n"; + #print "-- Checking ${aggsig} -- LastUpdated: ${last_updated} -- From: ${version_from_num} -- To: ${version_to_num}\n"; if ( $last_updated > $version_from_num ) { print "DROP AGGREGATE IF EXISTS $aggsig;\n"; print $def;