From: Sandro Santilli Date: Thu, 6 Sep 2018 22:21:03 +0000 (+0000) Subject: Do not DROP CASCADE types which are still used in columns X-Git-Tag: 3.0.0alpha1~464 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0a1c061a56dafeda85716996aa2c6d784496ba53;p=postgis Do not DROP CASCADE types which are still used in columns git-svn-id: http://svn.osgeo.org/postgis/trunk@16719 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/utils/create_undef.pl b/utils/create_undef.pl index 3795bb53d..13d388989 100755 --- a/utils/create_undef.pl +++ b/utils/create_undef.pl @@ -246,10 +246,44 @@ foreach my $fn (@funcs) } -print "-- Drop all types.\n"; +print "-- Drop all types if unused in column types.\n"; +my $quotedtypelist = join ',', map { "'$_'" } @types; foreach my $type (@types) { - print "DROP TYPE IF EXISTS $type CASCADE;\n"; + print <