[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


Dan Langille wrote:
> 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" ...);
>>
>> then refer to it as
>>
>> select filenameid, name from filename ...
>>
>> will fail.
>>
>> We should be
>>
>> select "FilenameId","Name" from "Filename" ...
>>
>> Therefore may be problems with backward compatibility.
> 
> No, please, let's not do this.  I don't think we should be "punishing" 
> the PostgreSQL users.  It is pretty much common and accepted practice to 
> not "quote" table names and column names.
> 
> I understand the goal.  I do not think this is the way to achieve it.
> 

I realise we have pretty much settled this whole issue.  Today I learned 
some more information.  For what it's worth, with respect to case 
sensitivity of table names and field names:

- The MYSQL behavior is not SQL standard
- PostgreSQL behavior is SQL standard

-- Dan Langille

-------------------------------------------------------------------------
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
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bacula-devel mailing list
Bacula-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/bacula-devel


This mailing list archive is a service of Copilotco.