PostGIS 1.3,1.4,1.5,2.0 can coexist in the same PostgreSQL server, but must be installed in separate databases.  This makes it a little easier to cross test different versions.  However -- all versions will share the same proj and geos dlls so you
may want to back these up libproj.dll, geos*.dll, shp2pgsql, pgsql2shp, libxml2-2.dll in the bin folder of your PostgreSQL install before continuing. PostGIS 2.0 has a dependency on libgdal.dll to support
raster support.

NOTE: For raster functions such as ST_Transform, ST_Resample, ST_Clip you'll need to set the following environment variables
a) GDAL_DATA -- this should be set to path of your gdal-data folder -- you can use the packaged one "C:\Program Files\PostgreSQL\9.1\gdal-data"
b) PROJ_SO -- this may not need to be set if you are running 9.1 64-bit sinc eit uses 4.7.1 (but if things don't work add it and set it to proj-0.dll)

-- create a postgis/raster database --
1) Edit the batch script changing ports etc. to your settings
2) You should uncomment the dattemplate line to make it a template database
3) Run the batch script

-- THE SHP2PGSQL-GUI -- 
The shp2pgsql-gui can run standalone or as a plugin under PgAdminIII. To run under a PgAdminIII install,
1) copy the postgis-gui folder to your bin directory which is identified in PgAdminIII -> Options -> General -> PG-binpath
2) overwrite the plugins.ini (assuming you haven't customized it), with the one in here,
or alternatively cut in these lines into your existing PgAdmin III plugins.ini.  This should work for PgAdmin III 1.9+

----Start here --
;
; PostGIS shp2pgsql-gui (Windows):
;
Title=PostGIS Shapefile and DBF loader
Command="$$PGBINDIR\postgisgui\shp2pgsql-gui.exe" -h "$$HOSTNAME" -p $$PORT -U "$$USERNAME" -d "$$DATABASE" -W "$$PASSWORD"
Description=Open a PostGIS ESRI Shapefile or Plain dbf loader console to the current database.
KeyFile=$$PGBINDIR\postgisgui\shp2pgsql-gui.exe
Platform=windows
ServerType=postgresql
Database=Yes
SetPassword=Yes

--- End Here --

--NOTE FOR UPGRADERS --
PostGIS 1.5, 1.4,1.3,2.0  can coexist on the same PostgreSQL install but must reside in different databases, but if you wish to maintain more than one
, make sure to copy the .sql scripts into separate folders so as to not get confused


The only caveat is that there can only be one geos install, so when you copy the above, you 
will automatically upgrade your proj to 4.8.0 and your GEOS to 3.3.2 


Since 2.0 is still a work in progress -- you might want to just work with test databases or restore your production
into a blank postgis 2.0 db.


If you are upgrading from 1.3 or 1.4 to 1.5 or older install (or earlier 2.0 SVN snapshot)
-- HARD UPGRADE
1) Backup your existing database with PgAmin III (make sure not to choose drop objects before restore)
2) Create a new postgis database using the above instructions
3) Restore your backup into this new postgis db (again you can use PgAdmin III for this)
4) Run the postgis_upgrade_20_minor.sql, rtpostgis_upgrade_20_minor.sql, and topology_upgrade_20_minor.sql files. (this is needed to get rid of ambiguous name conflicts)


NOTE: For PostgreSQL 9.0 the escape default has changed.
If you are having trouble viewing your geometries in your desktop app, set this setting in your db
ALTER DATABASE my_database_name_goes_here SET bytea_output to 'escape'; 

