db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@debrunners.com>
Subject Re: Upgrade changes committed
Date Fri, 22 Apr 2005 22:34:17 GMT
Mike Matrigali wrote:

> got it.
> 
> Would it make sense to just drop and recreate all system procedures
> in a hard upgrade?  It might be less code going forward, and less
> error prone to remember to just add the new ones?  Also would
> automatically work if there were any changes to system catalogs, but
> would definitely take longer than just adding the new ones.


Interesting idea.

Not sure the system catalog change argument is valid, since in that case
upgrade code would have to handle user procedures and functions anyway.

Also possible might be to more closely integrate the create and upgrade
code for procedures, so that adding a new procedure almost automatically
makes it part of upgrade. A method that is called by create database and
upgrade.

void createProcedures(boolean upgrade, int databaseVersion)
{
  if (!upgrade)
  {
    ... create 10.0 procedures
  }

  if (!upgrade || databaseVersion < DD_Version.DERBY_10_1)
  {
   ... create 10.1 procedures
  }
}


Dan.



Mime
View raw message