Re: quote_identifier (was Re: DBI Attributes)

2002-01-22 Thread Tim Bunce
On Mon, Jan 21, 2002 at 05:57:51PM -0800, Jonathan Leffler wrote: On Mon, 21 Jan 2002, Tim Bunce wrote: Since DBI won't allow the application to tell us that it wants to use quoted identifiers, we're stuck in a lose-lose situation. To tell if the driver is going to quote identifiers

Re: quote_identifier (was Re: DBI Attributes)

2002-01-21 Thread Tim Bunce
On Mon, Jan 21, 2002 at 01:42:40PM -0800, Jonathan Leffler wrote: [...] Thanks, the examples helped explain where you're coming from. I strongly recommend closing this conversation now. I've made all the points I can make as clearly as I can make them, and I'm not having any effect on

Re: quote_identifier (was Re: DBI Attributes)

2002-01-21 Thread Jonathan Leffler
On Mon, 21 Jan 2002, Tim Bunce wrote: On Mon, Jan 21, 2002 at 01:42:40PM -0800, Jonathan Leffler wrote: [...] Thanks, the examples helped explain where you're coming from. [..] The default implementation of quoted_identifier will work with DBD::Informix if the program has DELIMIDENT set

Re: quote_identifier (was Re: DBI Attributes)

2002-01-10 Thread Simon Oliver
Jonathan Leffler wrote: I don't see how quote_identifier helps a user of DBI write more portable code. Suppose I'm writing a cross DBMS system that needs to interact with various (unkown at compile time) database objects. Suppose I want to display a list of objects in the database, perhaps

Re: quote_identifier (was Re: DBI Attributes)

2002-01-10 Thread Tim Bunce
Good points. Thanks. I guess the problems we're trying to address are (at least): a) How should an app correctly quote an identifier if it wants to (for whatever reason). b) How to ensure that the results of $dbh-tables, $dbh-table_info, $dbh-column_info etc. are usable in SQL statements

Re: quote_identifier (was Re: DBI Attributes)

2002-01-10 Thread Tim Bunce
On Wed, Jan 09, 2002 at 09:54:07PM -0500, Rudy Lippan wrote: If a database do not support quoting, wouldn't be up to the DBD driver to complain loudly when someone tries to quote something, and otherwise just be a no-op? No need to complain. quote_identifier would just return the unquoted

Re: quote_identifier (was Re: DBI Attributes)

2002-01-09 Thread Tim Bunce
On Wed, Jan 09, 2002 at 09:57:27AM +, Simon Oliver wrote: Jonathan Leffler wrote: H, basically, I see what's going on. Informix only supports delimited identifiers if the environment variable DELIMIDENT is set when the connection is initiated, which will make this very

Re: quote_identifier (was Re: DBI Attributes)

2002-01-09 Thread Michael Peppler
Simon Oliver writes: With Synase ASA you can use SELECT CONNECTION_PROPERTY ('QUOTED_IDENTIFIER') to determine the current state. I've tried but failed to determine the current state with MS-SQL server using sp_dboption and sp_configure 'user options' - perhaps Michael Peppler knows how

Re: quote_identifier (was Re: DBI Attributes)

2002-01-09 Thread Tim Bunce
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 +, 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

Re: quote_identifier (was Re: DBI Attributes)

2002-01-09 Thread Rudy Lippan
Tim, On Thu, 10 Jan 2002, Tim Bunce wrote: 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

Re: quote_identifier (was Re: DBI Attributes)

2002-01-06 Thread Jonathan Leffler
Simon Oliver wrote: Tim Bunce wrote: FYI, here's what I'm playing with at the moment: sub quote_identifier { my $dbh = shift; my @id = grep { defined } @_; # ignore null elements (ie catalog, schema) s///gforeach @id;# escape embedded quotes