From 98fe7c41d91eaba9da5cb32705f0d3bf213ab134 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Tue, 4 Jun 2013 14:13:16 +0000 Subject: [PATCH] Let DO commands from SQL drop files end up in final upgrade script 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 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/utils/postgis_proc_upgrade.pl b/utils/postgis_proc_upgrade.pl index 946a49b6f..7dcd9e2b2 100755 --- a/utils/postgis_proc_upgrade.pl +++ b/utils/postgis_proc_upgrade.pl @@ -195,6 +195,16 @@ while() } } + if ( /^do *language .*\$\$/i ) + { + print; + while() + { + print; + last if /\$\$/; + } + } + # This code handles casts by dropping and recreating them. if ( /^create cast\s+\(\s*(\w+)\s+as\s+(\w+)\)/i ) { -- 2.50.1