From: Sandro Santilli Date: Fri, 10 Nov 2006 14:11:32 +0000 (+0000) Subject: Patch by Havard Tveite : X-Git-Tag: 1.2.0~19 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c3a06c5fd659f6648b88f8fb483320b05d8381a3;p=postgis Patch by Havard Tveite : * doc/postgix.xml (Hard Upgrade): add info about createdb params * utils/postgis_restore.pl: fix use of createdb params git-svn-id: http://svn.osgeo.org/postgis/trunk@2527 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/ChangeLog b/ChangeLog index 878c70a96..d04d4b02d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-11-10 Havard Tveite + + * doc/postgix.xml (Hard Upgrade): add info about createdb params + * utils/postgis_restore.pl: fix use of createdb params + 2006-11-02 Sandro Santilli * doc/postgis.xml: list setSRID bug fix in 'Bug fixes' section. diff --git a/doc/postgis.xml b/doc/postgis.xml index cd4986011..c0f488a62 100644 --- a/doc/postgis.xml +++ b/doc/postgis.xml @@ -454,8 +454,11 @@ as follow: # Restore the dump contextually upgrading postgis into # a new database. The new database doesn't have to exist. - # Let's call it "newdb" - $ sh utils/postgis_restore.pl lwpostgis.sql newdb olddb.dump > restore.log + # postgis_restore accepts createdb parameters after the dump + # file name, and that can for instance be used if you are using + # a non-default character encoding for your database. + # Let's call it "newdb", with UNICODE as the character encoding: + $ sh utils/postgis_restore.pl lwpostgis.sql newdb olddb.dump -E=UNICODE > restore.log # Check that all restored dump objects really had to be restored from dump # and do not conflict with the ones defined in lwpostgis.sql diff --git a/utils/postgis_restore.pl b/utils/postgis_restore.pl index d974f1225..23d147edd 100644 --- a/utils/postgis_restore.pl +++ b/utils/postgis_restore.pl @@ -677,7 +677,7 @@ close(OUTPUT); # Create the new db and install plpgsql language # print "Creating db ($dbname)\n"; -`createdb $dbname $createdb_opt`; +`createdb $createdb_opt $dbname`; die "Database creation failed\n" if ($?); print "Adding plpgsql\n"; `createlang plpgsql $dbname`;