Jeff Zucker wrote:
Another thing to consider is what is accepted as a delimited identifier delimiter. Most use the standard " but ODBC-Access accepts square brackets. Even more annoying is MySQL which (someone correct me if I'm wrong) accepts only backticks (ew) unless the daemon itslef is started with an --ansi flag, in which case it accepts either backticks or double quotes. So you don't know just from the driver name which is going to be accepted (ew). Some drivers like XBase don't accept quoted identifiers at all. SQLite, MySQL, and ODBC-Access all accept delimited identifiers but treat them case INsensitively!

There's also issues with the characters used to delimit values (single quote is of course the standard, but ...)

Jeff's point about square brackets is important. Note that Informix uses square brackets for substrings -- sometab.somecol[3,9] is a 7 character string from positions 3 through 9. (It also has the SUBSTR() function, but that's a recent arrival on the scene.) Also, Informix by default treats both "abc" and 'abc' as a string of three characters. If you want it to treat the double-quoted version as a delimited identifier, you have to tell it to do so with an environment variable set in the client (usually; it could be set by the server, overriding what any client sets). So just knowing the driver is Informix does not tell you whether any delimited identifiers are accepted. Informix treats delimited identifiers as case sensitive.


The second paragraph of Jeff's also warrants the same commentary about the use of single or double quotes being acceptable to Informix for enclosing strings unless you explicitly tell the server otherwise.

--
Jonathan Leffler ([EMAIL PROTECTED], [EMAIL PROTECTED]) #include <disclaimer.h>
Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/


Reply via email to