On Wed, Jan 09, 2002 at 09:41:28AM -0800, Michael Peppler wrote:
> Tim Bunce writes:
>  > On Wed, Jan 09, 2002 at 09:57:27AM +0000, Simon Oliver wrote:
>  > > Whether the DBD determines/sets this value on a per connection basis, when the
>  > > identifier_delimitor method is called or each time quoted_identifiers is
>  > > called would be up to the implementor of the DBD.
>  > 
>  > I'm not keen. I just don't see a need. The driver should know (or
>  > be able to work out for itself) if it should be quoting identifiers
>  > on any given connection. No application visible API is needed.
> 
> Unless I'm really missing something this would mean (at least for me)
> parsing the SQL and figuring out if some of the identifiers are
> keywords (or include spaces) and then turning the quoted_identifier
> property for that connection on.
> 
> Seems non-trivial to me...

No. The SQL should have been constructed by the application calling
quote_identifier() on any identifiers it contains.

The issue is how your DBD's quote_identifier implementation knows
whether it should quote or not.

And, as I said in my previous email:
> (A middle-road approach might be to have an option to quote_identifier
> that says only quote the identifier if it needs it. If a database
> don't support quoting identifiers then either quoting or not-quoting
> an identifier that needs it will generate an error anyway.)

I've now implemented that.

Tim.

Reply via email to