On 1/24/07, Emmanuel Cecchet <[EMAIL PROTECTED]> wrote:
> IMHO, we should store in the hashmap the clean version of the table
> name because we currently have two differents behaviours:
> - in the case when we create the table directly in Sequoia, the schema
> is updated with "tablename",
> - when we stop and restart the controller, we store tablename in the
> schema and not "tablename".
The problem is that we don't know what will be the case used by the
database if quotes are not used. And going through a full schema refresh
on DDL execution is too costly in general. So I think that the table
lookup mechanism should be flexible enough to accommodate both.

That was not my point. I was not talking about the case but about the
quotes/backticks. We should be consistent about what we store in the
DatabaseSchema IMHO to be sure the behaviour is the same when we
create the table through Sequoia and when we restart the controller.
It's not the case currently.

For the case, we rely on the fact that the user has a logical
database. Because for example, PostgreSQL is not case sensitive _or_
case insensitive, it's both. It's case insensitive _only if_ we don't
quote the identifiers. So if a user has "TabLe" and "tAbLe" and table
which he called by using TaBlE, we'll probably have problems. This is
probably acceptable anyway.

I'm not sure but I think there can be problems with schemas too if we
have two tables with the same names in 2 different schemas.

--
Guillaume

_______________________________________________
Sequoia mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/sequoia

Reply via email to