db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Army <qoz...@sbcglobal.net>
Subject Re: [jira] Commented: (DERBY-334) Add initial SQL support for XML datatype/functions in Derby, based on SQL/XML specs.
Date Sat, 04 Jun 2005 21:08:02 GMT
Satheesh Bandaram wrote:

> I think that part of the code needs to be changed too. You seem to be
> using DataDictionary just to set 'defaultImplId', which you might be
> able to do it outside of datatype layer?

It might be possible, but I'm not sure how.  The reason I use DataDictionary to 
get the default impl id is because the default impl id depends on the version of 
the _on-disk_ database, and that information is only available from the 
DataDictionary, so far as I know.

If we hardcode the default impl id somewhere in the XML class, then that means 
soft upgrade will break.  For example, if a 10.2 engine starts up a 10.1 
database and inserts some XML data, a hardcoded XML impl id for 10.2 will be 
written to disk.  Then the user backs out the softupgrade and tries to read the 
data, but it sees an impl id that it (10.1) doesn't recognize, so it chokes.

The only way to make this scenario work is to set the default impl id based on 
the on-disk database version.  And that means using DataDictionary.

If, as Dan said, we just want to code up for a single implementation (for now), 
then I can just drop this logic altogether--whoever's lucky enough to write the 
next XML implementation can deal with it ;)

Otherwise, I'm certainly open to ideas on how else to get this info without 
using the SQL layer...?


View raw message