Tim Hayes said:
> Can anyone offer advice?
>
> I have come across a MySQL database on Linux with duplicate table
> names - "Accounts" and "accounts". This seems fine on Linux, but
> does not transfer to the Windows environment - it is rejected
> because of the duplicate name. However I do see that Column Names
> have to be unique in both environments.
>
> Q. Is there some sort of practical advantage for having case
> sensitive table names in Linux, or is this a design "shortcoming"?

The SQL standard says that table names inside identifier quotes should
be matched "as is" against schema objects. Table names outside
identifier quotes should first be converted to uppercase and then
matched to schema objects. According to the SQL standard, double
quotes are identifier quotes.
So I would qualify the current behaviour of MySQL as a design
shortcoming. And the fact that it behaves differently on Windows and
Unix does not improve the situation.


> Postgress rejects duplicate table names.

MySQL rejects duplicate table names just as PostgreSQL does. Table
names that differ in case are not duplicates on all platforms.

And for the record, PostgreSQL's behaviour is not exactly standard
compliant either. Instead of converting unquoted identifiers to
uppercase they convert them to lowercase for readability.
But at least it behaves consistent between platforms and it uses
identifier quotes correctly.

Jochem





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to