]> granicus.if.org Git - postgis/commitdiff
#1693, #1704 - twofer - change DROP AGGREGATE and DROP VIEW to be DROP .. IF EXISTS
authorRegina Obe <lr@pcorp.us>
Tue, 27 Mar 2012 02:08:55 +0000 (02:08 +0000)
committerRegina Obe <lr@pcorp.us>
Tue, 27 Mar 2012 02:08:55 +0000 (02:08 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9550 b70326c6-7e19-0410-871a-916f4a2858ee

utils/create_undef.pl

index 80f5b13770a81e843df085fc8a600d74c1dd057f..99f311d269bdfad92a9befd79ddf4c85d694fb50 100755 (executable)
@@ -148,7 +148,7 @@ close( INPUT );
 print "-- Drop all views.\n";
 foreach my $view (@views)
 {
-       print "DROP VIEW $view;\n";
+       print "DROP VIEW IF EXISTS $view;\n";
 }
 
 print "-- Drop all tables.\n";
@@ -166,11 +166,11 @@ foreach my $agg (@aggs)
 {
        if ( $agg =~ /create aggregate\s*([\w\.]+)\s*\(\s*.*basetype = ([\w\.]+)/ism )
        {
-               print "DROP AGGREGATE $1 ($2);\n";
+               print "DROP AGGREGATE IF EXISTS $1 ($2);\n";
        }
        elsif ( $agg =~ /create aggregate\s*([\w\.]+)\s*\(\s*([\w,\.\s]+)\s*\)/ism )
        {
-               print "DROP AGGREGATE $1 ($2);\n";
+               print "DROP AGGREGATE IF EXISTS $1 ($2);\n";
        }
        else 
        {