Perhaps what would be useful is a set of comliance attributes that 
describes which "optional" DBI interfaces are supported and to what extent.

Jonathan Leffler wrote:

> Tim Bunce wrote:
> 
> 
>> Changes in DBI 1.16,    30th May 2001
>> 
>>   Added note to data_sources() method docs that some drivers may
>>     require a connected database handle to be supplied as an attribute.
> 
> 
> With all due respect, Tim, this is completely ducking the issue.  Yes, after a 
>fashion it
> resolves the problem, rather like saying "Under-age kids should not drink in pubs" 
>solves a
> problem.  It doesn't really cut to the meat of the issue though -- the data_sources()
> method is not generally useful because the interface is incomplete.
> 
> 
> 
>> On Sun, Jun 10, 2001 at 03:36:12PM -0700, Jonathan Leffler wrote:
>> 
>>> Michael Peppler wrote:
>>> 
>>> 
>>>> Curt Russell Crandall writes:
>>>>  > I didn't have an Informix DB available at the time, but yes it does return
>>>>  > a list of dbs with data_sources... however, Sybase does not as well as
>>>>  > many others.
>>>> 
>>>> DBD::Sybase could be made to return the list of known servers (from
>>>> the interfaces file), but not the list of databases, as that requires
>>>> connecting to each of the servers in the interfaces file (and we need
>>>> to know user/pwd for each server, etc - gets a little hairy).
>>> 
>>> We had a discussion about this on the dbi-users mailing list during February 2000, 
>in
>>> the run-up to the release of DBI 1.14.  Tim promised to look into it, but either 
>came
>>> up with a negative decision without notifying us or (much more likely) overlooked a
>>> comparatively minor feature that only impacts a few database servers...
>>> 
>>> == quote 1 ==
>>>   Subject:   Re: DBI->data_sources() - assumption of anonymous user is a bug
>>>   Date:  Wed, 09 Feb 2000 20:41:54 -0800
>>>   From:  Jonathan Leffler <[EMAIL PROTECTED]>
>>>   To:  Randall Whitman <[EMAIL PROTECTED]>
>>>   CC:   [EMAIL PROTECTED]
>>> 
>>> Randall Whitman wrote:
>>> 
>>> 
>>>> We consider the assumption of an anonymous user to be a bug --
>>>> that is, the behavior that
>>>>     DBI->data_sources("mysql");
>>>> returns an empty array because we do not have an anonymous
>>>> user in MySQL.
>>>> 
>>>> In other words, it should be possible to do one of the following:
>>>> 
>>>>   @databases = DBI->data_sources("mysql", "USER", "PASSWORD");    ## or...
>>>> 
>>>>   $dbh = DBI->connect("dbi:mysql:", "USER", "PASSWORD");
>>>>   @databases = $dbh->data_sources("mysql");
>>> 
>>> I sympathize with this; the last remaining test the DBD::Informix 1.00
>>> pre-releases sometimes skip (instead of failing as in earlier versions)
>>> is the data sources test, and it too is because there is no user
>>> information available even though it can be needed to connect to the
>>> database server to obtain the list of databases.
>>> 
>>> I note in passing that if you do the connection first, DBD::Informix
>>> will generate a list of data sources OK, but the whole point of the
>>> data sources method is to find out what's available before formally
>>> connecting to one of the available data sources.
>>> 
>>> Please can we modify DBI 1.14 to handle this, Tim?
>>> It looks like a simple, backwards compatible extension to me...
>>> 
>>> 
>>> 
>>>> I realize that implementation of such would require support from the
>>>> actual driver module, but currently the DBI does not provide a way
>>>> to use such a feature.  I have posted a note regarding this issue
>>>> to [EMAIL PROTECTED] [...]
>>> 
>>>> [from msql-mysql-modules]
>>>> 
>>>> 
>>>>> We consider the assumption of an anonymous user in listdbs to be a bug.
>>>> 
>>>> ..
>>>> I agree with you, but I refuse to support listdbs, as there is
>>>> the portable DBI->data_sources().  IMO the better way to go
>>>> is the support for user names and passwords with the data_sources
>>>> method.  If you are interested in that, please contact Tim Bunce.
>>>> ..
>>>> Thanks, Jochen
>>> 
>>> == end quote 1 ==
>>> 
>>> == quote 2 ==
>>>        Date:  Thu, 10 Feb 2000 10:11:23 +0000
>>>        From: Tim Bunce <[EMAIL PROTECTED]>
>>>        To: Jonathan Leffler <[EMAIL PROTECTED]>
>>>        CC: Randall Whitman <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
>>> 
>>> On Wed, Feb 09, 2000 at 08:41:54PM -0800, Jonathan Leffler wrote:
>>> 
>>>> Please can we modify DBI 1.14 to handle this, Tim?
>>>> It looks like a simple, backwards compatible extension to me...
>>> 
>>> I'll look into it.
>>> 
>>> Tim.
>>> 
>>> == end quote 2 ==
>>> 
>>> 
>>> 
>>> 
>>>>  > On Thu, 7 Jun 2001, Jonathan Leffler wrote:
>>>>  > > Curt Russell Crandall wrote:
>>>>  > > > Is the DBI->data_sources method the only facility available in the DBI to
>>>>  > > > get a list of databases on a server?  [...]
>>> 
>>>>  > > > Sybase won't return anything with data_sources and I'm not
>>>>  > > > sure if Informix will either... those are the 2 dbs I'm concerned with 
>[...]
>>>> 
>>>>  > >
>>>>  > > Have you tried using data_sources with DBD::Informix?  [...]
>>> 
> 
> 
> 
> 
> --
> Jonathan Leffler ([EMAIL PROTECTED], [EMAIL PROTECTED])
> Guardian of DBD::Informix 1.00.PC1 -- see http://www.cpan.org/
> #include <disclaimer.h>


-- 
   Simon Oliver

---------------------------------------
   Department of Biomolecular Sciences
   UMIST, PO Box 88, Sackville St
   Manchester, M60 1QD
   United Kingdom

   Phone:  +44 161 200 8912
   Fax:    +44 161 236 0409
   Mobile: +44 776 183 0327
   Email:  [EMAIL PROTECTED]
---------------------------------------

Reply via email to