> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Rob Vermeulen
> 
> By browsing though the InformixSqlHandler i noticed that the reserved 
> keywords are not used to modify the table names.
> 
>     // Tablename, prefixed with basename and underscore
>             sb.append(mmbase.getBaseName()).
>                     append("_").
>                     //Currently no replacement strategy is 
> implemented for
>                     //invalid tablenames.
>                     //This would be useful, but requires 
> modification to
>                     //the insert/update/delete code as well.
>                     //append(getAllowedValue(tableName));
>                     append(tableName);
> 
> So i could add the keyword public to the reserved keyword 
> list, but if 
> somebody is going to 'fix' this code above we will have a 
> problem again, 
> because the wrong database table will be accessed. 

The comment in the code could be mine. There is actually no need to fix
this, the actual tablenames are very unlikely to conflict with reserved
words due to the way all tablenames are prefixed by the basenume +
unserscore.

> Apart from this 
> problem i am really wondering if we actually need a reserved keyword 
> list. Is it not possible to prefix the tablenames, 
> fieldnames, and alias 
> names? If this is possible i think MMBase should solve the 
> problem and 
> not a configuration file that was, since the beginning of 
> mmbase, never 
> correct.

Yes this is possible to prefix all fieldnames is a similar fashion, but
this will create backward compatilbility problems with existing
databases having the original fieldnames. One solution is to make the
naming strategy configurable, so at least new MMBase installations can
use it.

Rob van Maris
Technical Consultant

Quantiq
xmedia & communication solutions



Reply via email to