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 the discussion. I don't have time to work out how to
> reiterate differently what I've said previously. The default
> implementation of quoted_identifier will work with DBD::Informix if the
> program has DELIMIDENT set when the connection is made;
Good.
> it will break if DELIMIDENT is not set.
Not so good, but easy to fix (to the extent possible) in the way
I've previously described: Add your own quoted_identifier method
that does no quoting if DELIMIDENT is not set.
> 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 from tables()
an application can do:
if ($dbh->quoted_indentifier('foo') eq '"foo"') { ... }
and DBD::Informix is free to add it's own private attributes and/or
versions of quoted_indentifier etc. to define whatever semantics it likes.
> It is all a bit academic; I don't really have time to do
> anything significant to DBD::Informix anyway -- it will limp along as it
> has for the last two years.
Any feel for how many applications may be using tables() with
DELIMIDENT not set? (Yes, I know it's an impossible question :)
I could grandfather in a hack to quoted_identifier so that, for
DBD::Informix, it makes tables() behave like it does now for.
> >If there's a problem with the (recently added) $dbh->begin_work method
> >then please feel free to start up a new thread.
>
> Informix has extensions to BEGIN WORK, such as BEGIN WORK WITHOUT
> REPLICATION, which I abhor but which DBD::Informix needs to be able to support.
$dbh->begin_work( { ix_foo => 'bar' } );
> AutoCommit screws me up all ways, and this is particularly painful. And
> it is particularly bad since we don't have database-dependent connection
> attributes AFAICT -- stuff such as:
>
> DBI->connect($dbid,$user,$pass,{db_attribute=>1})
Er, I'm not sure what you're asking here, but for years the DBI->connect
has basically done
$dbh->{$_} = $attr->{$_} foreach keys %$attr;
In other words all connect method attributes become handle attributes.
Also the $attr is passed to the drivers connect method so that the
attributes are available to the code that's making the connection.
> With support for those, I could (and would) allow informed users of
> DBD::Informix to override the DBI defaults that make life hell for
> everyone using Informix databases.
You have them.
> The innocent application writer who
> is given an Informix database would still get DBI-compliant behaviour,
> but those needing native behaviour would be able to get it.
Which has always been a core philosophy of the DBI.
> Since I've had no success converting people to my viewpoint starting
> from the days when AutoCommit was first mooted, despite extensive
> kilobytes of discussion, I have no intention whatsoever of reopening the
> discussion. My previous comments all still apply. IMNSHO, the idea of
> DBI imposing AutoCommit is, and always was, misguided. DBI should
> provide a mechanism that allows the DBD to describe the native semantics
> of the database (no transactions, implicit transactions, explicit
> transactions, whatever; these days, we should be reviewing whether
> savepoint and rollback to savepoint are supported),
The latest release of the DBI has a $dbh->get_info method to return
that kind of info (as per the ODBC GetInfo function).
> rather than making
> DBD writers jump through hoops to make their database servers perform
> unnatural acts without a connect-time get-out clause that lets the user
> say "behave naturally; ignore the DBI imposed semantics". Adding
> AutoCommit support to DBD::Informix made it vastly bigger than it should
> be -- it is horrendously hairy to do remotely properly, and I'm not sure
> I've got it right even now. And there are things that I should be able
> to do that it prohibits me from doing. If you need to see more details
> of my views, go to the archives. They are (or should be) copious.
>
> Or we need to find someone else who can manage a more flexible mindset
> to maintain DBD::Informix for the DBI community -- volunteers very
> welcome.
>
> The subject of AutoCommit is closed again as of now.
>
> --
> 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!"
Tim.