Thomas Dudziak wrote:
On 11/30/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
I started looking into DdlUtils as a very attractive approach to deal with
automatic database creation and evolution. After doing some tests (with
postgres so far) and looking into the code, it seems that the catalogs and
schemas of tables are ignored in several places (through out?) including
database comparisons, databases XML I/O, and SQL generation. As a result, if a
user has access to more than one schemas (possibly sharing some table names)
things usually don't work. Is this a correct assesemt or am I missing
something? If it is correct, is this intentional for some reason or a current
implementation limitation?
The problem is that the jdbc drivers largely ignore them. E.g.
Connection.setCatalog does nothing in the PostgreSQL JDBC driver. So
if you want to use them, for now you have to use qualified table
names.
DdlUtils could however do the name concatenation which would allow to
use the same XML file with different database schemas. Perhaps you
could create an issue in DdlUtils' JIRA ?
Tom
In order for me to understand the problem (and create the appropriate
issue) I'd like to know what is an instance of the Database class supposed to
represent. Is it a "real" database that can possibly include multiple catalogs
and schemas? Or is it a just a "schema", i.e. a single space of unique tables?
My guess is it's the latter which looks like a better choice. If that's
indeed the case, then I believe that there need to be some changes in the API
to allow better (more explicit) handling of catalogs/schemas, hopefully
independently from the capabilities of the JDBC Driver.
I will try to create the issue on JIRA and maybe suggest some changes.