From 7c12e01d59512bd38bb55cc257d3624c21c323c4 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Tue, 13 Dec 2011 10:38:19 +0000 Subject: [PATCH] Always output create ore replace view in upgrade scripts (#1097) git-svn-id: http://svn.osgeo.org/postgis/trunk@8380 b70326c6-7e19-0410-871a-916f4a2858ee --- utils/postgis_proc_upgrade.pl | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/utils/postgis_proc_upgrade.pl b/utils/postgis_proc_upgrade.pl index ba912e8d3..4b4e9814c 100755 --- a/utils/postgis_proc_upgrade.pl +++ b/utils/postgis_proc_upgrade.pl @@ -246,26 +246,15 @@ while() } } - # This code handles view by creating them if we are doing a major upgrade + # Always output create ore replace view (see ticket #1097) if ( /^create or replace view\s+(\S+)\s*/i ) { - my $viewname = $1; - my $def = $_; + print; while() { - $def .= $_; + print; last if /\;\s*$/; } - my $ver = $version_from_num + 1; - while( $version_from_num < $version_to_num && $ver <= $version_to_num ) - { - if( $objs->{$ver}->{"views"}->{$viewname} ) - { - print $def; - last; - } - $ver++; - } } # This code handles operator classes by creating them if we are doing a major upgrade -- 2.40.0