From 293224833b37e3d5f35a36f731ba4f4437243438 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Sat, 22 Feb 2014 16:48:43 +0000 Subject: [PATCH] Print warning on missing last updated info in aggregates git-svn-id: http://svn.osgeo.org/postgis/trunk@12246 b70326c6-7e19-0410-871a-916f4a2858ee --- utils/postgis_proc_upgrade.pl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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; -- 2.40.0