]> granicus.if.org Git - postgis/commitdiff
Let DO commands from SQL drop files end up in final upgrade script
authorSandro Santilli <strk@keybit.net>
Tue, 4 Jun 2013 14:13:16 +0000 (14:13 +0000)
committerSandro Santilli <strk@keybit.net>
Tue, 4 Jun 2013 14:13:16 +0000 (14:13 +0000)
Should fix upgrade path from 2.0 to 2.1 (#2334)

git-svn-id: http://svn.osgeo.org/postgis/trunk@11518 b70326c6-7e19-0410-871a-916f4a2858ee

utils/postgis_proc_upgrade.pl

index 946a49b6f3314c0d90171267135cbe06eaacc9b1..7dcd9e2b2c164cd51182152581b8f390da4b76b5 100755 (executable)
@@ -195,6 +195,16 @@ while(<INPUT>)
                }
        }
 
+       if ( /^do *language .*\$\$/i )
+       {
+               print;
+               while(<INPUT>)
+               {
+                       print;
+                       last if /\$\$/;
+               }
+       }
+
        # This code handles casts by dropping and recreating them.
        if ( /^create cast\s+\(\s*(\w+)\s+as\s+(\w+)\)/i )
        {