[postgis-devel] postgis_upgrade.sql

strk strk at keybit.net
Thu Jun 25 04:46:41 PDT 2009


On Wed, Jun 24, 2009 at 02:52:48PM -0400, Paragon Corporation wrote:
> I wasn't thinking of getting rid of the upgrade sql nor doing all the logic
> in the upgrade_funciton.
> 
> What I was saying is we  have a plpgsql function that selective deletes new
> functions -- like all the functions supporting box3d or whatever type we
> created and throws and error if there is no way to do it without destroying
> data or views.

The problem I see is really only for types so far.
The 'create or replace' construct works fine with functions.

The nice thing of current upgrade script (if I haven't missed later
changes) is that it's autogenerated, so no maintainance required.
The other nice thing is you can keep feeding it to your database
to swich between postgis versions (even if it's just to change
path to the library).

If we try our best to not change types we can have a run_if_missing_typeing
pl/pgsql function running an arbitrary code if a type is missing.
Doing so might help keeping the auto-generation by simply passing the
whole CREATE TYPE statement as an argument to such a function.

What do you think ?

--strk;

 Free GIS & Flash consultant/developer      ()  ASCII Ribbon Campaign
 http://foo.keybit.net/~strk/services.html  /\  Keep it simple! 



More information about the postgis-devel mailing list