From 5aa32205b3978efecc384d5451b580b0f7ab0f0d Mon Sep 17 00:00:00 2001 From: Regina Obe Date: Tue, 27 Mar 2012 02:08:55 +0000 Subject: [PATCH] #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 --- utils/create_undef.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 { -- 2.50.1