[development] Any solution for solving DB reserved word conflict?

Edison Wong hswong3i at edin.no-ip.com
Mon Feb 18 05:54:45 UTC 2008

Hash: SHA1
|> I would like to ask for some support and suggestion for a 6-year-old
|> issue: DB reserved word conflict within Drupal core
|> (http://drupal.org/node/371).
| I don't really know the particulars of the issue, but in general
| reserved word issues can be corrected by using delimited identifiers.
| Unfortunately, delimited identifiers can be dbms specific.  Still,
| that wheedles the problem down to defining the delimiter for the DBMSs
| you want to support.

Totally correct. Each DB come with its specific delimited identifiers, 
e.g. ` (MySQL), " (PostgreSQL, Oracle, DB2, SQLite), [ ] (MSSQL). So 
what I am proposing in http://drupal.org/node/371 is quite simple: use 
an universal token, as like as the idea of { } for table prefix.

First of all, quota all potential reserved word with [ ] (since it is a 
pair up token, easy for regex), and further more replace it as DB 
specific delimited identifiers within each driver implementation. 
Because we define a black-and-white definition manually and under 
control, this solution is much accuracy than any others :-)

BTW, since { } is target for table prefix replacement under our existing 
DB API implementation, I am not going to merge it with the idea of using 
[ ] (target as universal token of delimited identifier). Less merge, 
less dependent and conflict, so more flexible :-)

- --
Edison Wong
hswong3i at gmail.com
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hswong3i.vcf
Type: text/x-vcard
Size: 187 bytes
Desc: not available
Url : http://lists.drupal.org/pipermail/development/attachments/20080218/c1999bea/attachment.vcf 

More information about the development mailing list