On Mon, 7 Jan 2002, Michael Peppler wrote:
>Jonathan Leffler writes:
> > I was looking at it from the other (another?) point of view - namely
> > that of an application written using identifiers that must be
> > quoted, either because they contain characters that are not
> > ordinarily allowed in identifiers (eg blanks and punctuation) or
> > because they are identical with keywords. [...] So, a generic DBI
> > application cannot use double-quoted identifiers with Informix
> > unless it knows enough to set the Informix-specific DELIMIDENT
> > environment variable.
>
>Sybase (and MS-SQL) is the same - If keywords or spaces are used in
>identifiers the the QUOTED_IDENTIFIER connection attribute must be
>set, and the identifiers must be quoted.
Tim,
It appears that there are several significant drivers that need a
connection attribute to provide proper support for delimited identifiers
or quoted identifiers or whatever name you choose.
> > Or, we could revise the DBI->connect method to allow the
> > application to indicate that it uses delimited identifiers:
> >
> > $dbh = DBI->connect($dsn, $user, $pass, { EnableDelimitedIdentifiers => 1,
>RaiseError => 1, ...});
Thinking marginally harder, the 'Enable' part is redundant, and I don't
mind which of QuotedIdentifiers and DelimitedIdentifiers (where
delimited identifier is the term used in the SQL standard, but quoted
identifiers makes at least as much sense to the uninitiated, and it's
shorter) is used, or any more or less equivalent alternative -- assuming
that DBI will actually go along with this request for support.
> > If this declarative option was available, DBD::Informix can do what is
> > necessary to make it work, and those drivers (the majority?) that do not
> > need to do anything to make delimited identifiers work can simply ignore
> > the attribute.
>
>Agreed - DBD::Sybase would need the same support, I don't think that I
>can handle it transparently.
--
Jonathan Leffler #include <disclaimer.h>
STSM, IBM Data Management Solutions. Phone: +1 650-926-6921
Email: [EMAIL PROTECTED], [EMAIL PROTECTED]
Guardian of DBD::Informix v1.00.PC1 -- http://dbi.perl.org
"I don't suffer from insanity; I enjoy every minute of it!"