Hi,
We're evaluating Pgplus Standard along with the stackbuilder packaged PostGIS. The tutorial at says to create a database by:
CREATE DATABASE roadmaps WITH OWNER = gisadmin TEMPLATE = template_postgis;
Which works fine on a new database. Because we're migrating an existing PostgreSQL database in, we did a restore of the pg_dump'd backup then did the equivalent of what I think the TEMPLATE= clause would do:
$ pg_dump template_postgis | psql -f - our_database
It seems to have worked. But the thing is that, looking through the dump, it uses CREATE FUNCTION rather than CREATE OR REPLACE FUNCTION, which means that when StackBuilder updates the version of PostGIS installed, the base shared objects are updated, but the FUNCTIONS wouldn't be. We can't "dump template_postgis / restore our_database" like above, because it uses CREATE rather than CREATE OR REPLACE. I assume even if we had created the database with TEMPLATE=template_postgis we'd have the same problem.
So I guess the question is a generic one - how do you apply / handle StackBuilder pushed PostGIS schema updates?