Skip Menu |
 

This queue is for tickets about the DBD-SQLite CPAN distribution.

Report information
The Basics
Id: 61117
Status: resolved
Priority: 0/
Queue: DBD-SQLite

People
Owner: Nobody in particular
Requestors: davidp [...] preshweb.co.uk
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: Supporting database as an alias for dbname in DSN
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 896
Download (untitled) / with headers
text/plain 896b
The documentation for DBI recommends that DBD::* modules should understand the parameter database= in a DSN, but DBD::SQLite requires dbname=. Quoting from DBI's docs: It is recommended that drivers support the ODBC style, shown in the last example above. It is also recommended that that they support the three common names 'host', 'port', and 'database' (plus 'db' as an alias for database). This simplifies automatic construction of basic DSNs: "dbi:$driver:database=$db;host=$host;port=$port". Drivers should aim to 'do something reasonable' when given a DSN in this form [...] DBD::Pg also expects dbname, but recognises database (and db) also - it would be great if DBD::SQLite would do the same. I'd be happy to provide a patch if requested, although I expect it'd be trivial to implement - the question is more whether you consider it a good idea.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-24874-1284622283-1836.61117-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 1077
Implemented in the trunk. It's a good idea that fixes an overlooked compat issue. Thanks. On Mon Sep 06 12:15:53 2010, BIGPRESH wrote: Show quoted text
> The documentation for DBI recommends that DBD::* modules should > understand the parameter > database= in a DSN, but DBD::SQLite requires dbname=. > > Quoting from DBI's docs: > > It is recommended that drivers support the ODBC style, shown in > the > last example above. It is also recommended that that they support > the > three common names 'host', 'port', and 'database' (plus 'db' as an > alias for database). This simplifies automatic construction of > basic > DSNs: "dbi:$driver:database=$db;host=$host;port=$port". Drivers > should aim to 'do something reasonable' when given a DSN in this > form > [...] > > DBD::Pg also expects dbname, but recognises database (and db) also - > it would be great if > DBD::SQLite would do the same. > > I'd be happy to provide a patch if requested, although I expect it'd > be trivial to > implement - the question is more whether you consider it a good idea.
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-24874-1284622283-1836.61117-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <rt-3.8.HEAD-24874-1284622283-1836.61117-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-19311-1291963676-1422.61117-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 1238
Download (untitled) / with headers
text/plain 1.2k
DBD::SQLite 1.32_01 with this fix is out. Thanks. On 2010-9-16 Thu 03:31:23, ISHIGAKI wrote: Show quoted text
> Implemented in the trunk. It's a good idea that fixes an overlooked > compat issue. Thanks. > > On Mon Sep 06 12:15:53 2010, BIGPRESH wrote:
> > The documentation for DBI recommends that DBD::* modules should > > understand the parameter > > database= in a DSN, but DBD::SQLite requires dbname=. > > > > Quoting from DBI's docs: > > > > It is recommended that drivers support the ODBC style, shown in > > the > > last example above. It is also recommended that that they
support Show quoted text
> > the > > three common names 'host', 'port', and 'database' (plus 'db' as
an Show quoted text
> > alias for database). This simplifies automatic construction of > > basic > > DSNs: "dbi:$driver:database=$db;host=$host;port=$port". Drivers > > should aim to 'do something reasonable' when given a DSN in this > > form > > [...] > > > > DBD::Pg also expects dbname, but recognises database (and db) also - > > it would be great if > > DBD::SQLite would do the same. > > > > I'd be happy to provide a patch if requested, although I expect it'd > > be trivial to > > implement - the question is more whether you consider it a good
idea. Show quoted text
> >


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.