[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bacula-devel] MySQL, PostgreSQL the names of the fields and case sensitive

On Monday 21 July 2008 15:01:41 Yuri Timofeev wrote:
> I made a few mistakes in the code examples of scripts, but generally
> all right ;)
> Yes, of course, names for MySQL "correct". They must be taken as a basis.
> Database, table, field and columns names in PostgreSQL are
> case-independent, unless you created them with double-quotes
> around their name, in which case they are case-sensitive.
> Note: that PostgreSQL actively converts all non-quoted names to lower
> case and so returns lower case in query results.
> In MySQL, table names can be case-sensitive or not, depending on which
> operating system you are using.
> Therefore, if the PostgreSQL to create a table like this:
> CREATE TABLE "Filename" ( "FilenameId" ..., "Name" ...);

I don't have any problem with the above because for the most part these items 
only effect the PostgreSQL scripts -- exception a few temp tables.  However, 
I would like to have the fact that the above will not cause us any problems 
confirmed by our DBA expert -- Marc Cousin.

> then refer to it as
> select filenameid, name from filename ...
> will fail.
> We should be
> select "FilenameId","Name" from "Filename" ...

I am not in favor of doing the above; it would mean massive changes to the 
source code, adds a whole lot of useless characters, and makes it much harder 
to read the code.  It is also a *real* pain within C++ strings where all the 
double quotes will need to be escaped.

If we are talking about this kind of change, I would prefer to leave 
everything as it is.  Our current code is self consistent and correct.  While 
I don't mind making some minor effort to improve portability, it appears that 
the problems are coming from the PDO module, which appears to be 
incompatible, so I am not too inclined to make any massive changes.

> Therefore may be problems with backward compatibility.

I would like to understand the details of any possible compatibility problems 
before committing it ...

This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
Bacula-devel mailing list

This mailing list archive is a service of Copilotco.