From: Regina Obe Date: Tue, 27 Mar 2012 02:08:55 +0000 (+0000) Subject: #1693, #1704 - twofer - change DROP AGGREGATE and DROP VIEW to be DROP .. IF EXISTS X-Git-Tag: 2.0.0rc1~21 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5aa32205b3978efecc384d5451b580b0f7ab0f0d;p=postgis #1693, #1704 - twofer - change DROP AGGREGATE and DROP VIEW to be DROP .. IF EXISTS git-svn-id: http://svn.osgeo.org/postgis/trunk@9550 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/utils/create_undef.pl b/utils/create_undef.pl index 80f5b1377..99f311d26 100755 --- a/utils/create_undef.pl +++ b/utils/create_undef.pl @@ -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 {