[Typo3-dev] quoting SQL-identifiers

Karsten Dambekalns karsten at typo3.org
Fri Apr 22 17:22:13 CEST 2005


Hi.

Rainer Kuhn wrote:
> Martin Kutschker wrote:
>> It's possible to quote SQL-identifiers (eg table names) to avoid a clash
>> with reserved names.

Even better - don't use reserved names at all. Use quoting to make sure
*allowed* names are correctly understood (upper/lower case as an example).

>  > How about other RDBMS'?
> 
> AFAIK for PostgreSQL it's " (double quotes).

For all *but* MySQL it's " - that's the standard. Go figure. :/

> IMHO we should offer at least one DBAL method (as the one you suggested)
> to use if needed. Furthermore I think it wouldn't be bad to use identifier
> quoting in DBAL per default, this could prevent any probems.

"Real" DBAL, i.e. if using the DBAL extension, does quote all identifiers
automagically. To have TYPO3 quote identifiers automatically will probably
not be accepted by Kasper (this would mean we'd have to do more parsing and
string-juggling), so rather change the field name.

That's my view. :)

Karsten
-- 
Karsten Dambekalns
TYPO3 Association - Active Member
http://association.typo3.org/




More information about the TYPO3-dev mailing list