]> granicus.if.org Git - postgis/commitdiff
Wrap rtpostgis_upgrade.sql in a transaction (#2749)
authorSandro Santilli <strk@keybit.net>
Tue, 27 May 2014 16:34:18 +0000 (16:34 +0000)
committerSandro Santilli <strk@keybit.net>
Tue, 27 May 2014 16:34:18 +0000 (16:34 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@12589 b70326c6-7e19-0410-871a-916f4a2858ee

raster/rt_pg/Makefile.in

index af0663c2c32e7f82c2c75795c38328769409a17c..f79b344f57fe6c053a3965d8e3f08ea62b6560ec 100644 (file)
@@ -123,7 +123,9 @@ rtpostgis_upgrade.sql.in: rtpostgis.sql ../../utils/postgis_proc_upgrade.pl
        $(PERL) ../../utils/postgis_proc_upgrade.pl $< UNUSED > $@
 
 rtpostgis_upgrade.sql: rtpostgis_upgrade_cleanup.sql rtpostgis_drop.sql rtpostgis_upgrade.sql.in 
-       cat $^ > $@
+       echo 'BEGIN;' > $@
+       cat $^ | sed -e 's/^BEGIN;$$//' -e 's/^COMMIT;$$//' >> $@
+       echo 'COMMIT;' >> $@
 
 uninstall_rtpostgis.sql: rtpostgis.sql ../../utils/create_undef.pl 
        $(PERL) ../../utils/create_undef.pl $< $(POSTGIS_PGSQL_VERSION) > $@