[MonetDB-users] DBD::monetdb and database name
I just started trying to use DBD::MonetDB and ran into a couple of issues. I'm not sure where you prefer to get reports so I thought I'd send it here first. First, although both the version on CPAN and the version on my machine, presumably from the MonetDB installation, both claim to be version 0.09, they are different. IMHO, this is a Bad Idea. Having the up-to-date version on CPAN is desirable since that's what Perl programmers expect. Having two versions with the same number is essential, since otherwise CPAN's and Perl's dependency mechanisms will fail and bug reporting becomes a real problem. Second, and what caused me to investigate more carefully, when I typed in the first example program for DBD::monetdb I saw: $ ./monetdb-test-1.pl DBI connect('','',...) failed: merovingian: no such database 'demo', please create it first That doesn't surprise me, because I didn't create a demo database. But I was surprised when I couldn't find any facility to name the database in the documentation or the code. Except when I actually read the installed code as opposed to the published version on CPAN I see that there is. So please add docs. I've suggested a patch below. Cheers, Dave PS The code will compile a little faster if you use __END__ --- /usr/lib/perl5/DBD/monetdb.pm 2010-03-22 16:22:51.000000000 +0000 +++ perl/DBD/monetdb.pm 2010-04-14 15:18:13.000000000 +0100 @@ -670,6 +670,8 @@ 1; +__END__ + =head1 NAME DBD::monetdb - MonetDB Driver for DBI @@ -783,6 +785,7 @@ $dsn = 'dbi:monetdb:'; $dsn = "dbi:monetdb:host=$host"; $dsn = "dbi:monetdb:host=$host;port=$port"; + $dsn = "dbi:monetdb:host=$host;database=$database"; $dbh = DBI->connect($dsn, $user, $password); @@ -794,7 +797,11 @@ =item port -The port where MonetDB daemon listens to. Default for MonetDB is 50000. +The port where MonetDB daemon listens. Default for MonetDB is 50000. + +=item database + +The name of the database to connect to. =back
Thanks for the patch. I have applied it (or a very slight variation of it) to our sources. I have also updated the version number to 0.10. Unfortunately, the person who wrote and maintained the Perl code is no longer active in the project, and nobody else here seems to have enough Perl expertise to maintain the code. I'm not sure whether anyone here knows how to submit the code to CPAN. I'm not even sure anybody here knew it was available there. We usually prefer to get this type of feedback on the bug tracker since then it doesn't get lost. You don't need to do that now, since I have already applied the patch. On 2010-04-14 16:20, Dave Howorth wrote:
I just started trying to use DBD::MonetDB and ran into a couple of issues. I'm not sure where you prefer to get reports so I thought I'd send it here first.
First, although both the version on CPAN and the version on my machine, presumably from the MonetDB installation, both claim to be version 0.09, they are different. IMHO, this is a Bad Idea. Having the up-to-date version on CPAN is desirable since that's what Perl programmers expect. Having two versions with the same number is essential, since otherwise CPAN's and Perl's dependency mechanisms will fail and bug reporting becomes a real problem.
Second, and what caused me to investigate more carefully, when I typed in the first example program for DBD::monetdb I saw:
$ ./monetdb-test-1.pl DBI connect('','',...) failed: merovingian: no such database 'demo', please create it first
That doesn't surprise me, because I didn't create a demo database. But I was surprised when I couldn't find any facility to name the database in the documentation or the code. Except when I actually read the installed code as opposed to the published version on CPAN I see that there is. So please add docs. I've suggested a patch below.
Cheers, Dave
PS The code will compile a little faster if you use __END__
--- /usr/lib/perl5/DBD/monetdb.pm 2010-03-22 16:22:51.000000000 +0000 +++ perl/DBD/monetdb.pm 2010-04-14 15:18:13.000000000 +0100 @@ -670,6 +670,8 @@
1;
+__END__ + =head1 NAME
DBD::monetdb - MonetDB Driver for DBI @@ -783,6 +785,7 @@ $dsn = 'dbi:monetdb:'; $dsn = "dbi:monetdb:host=$host"; $dsn = "dbi:monetdb:host=$host;port=$port"; + $dsn = "dbi:monetdb:host=$host;database=$database";
$dbh = DBI->connect($dsn, $user, $password);
@@ -794,7 +797,11 @@
=item port
-The port where MonetDB daemon listens to. Default for MonetDB is 50000. +The port where MonetDB daemon listens. Default for MonetDB is 50000. + +=item database + +The name of the database to connect to.
=back
------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users
-- Sjoerd Mullender
participants (2)
-
Dave Howorth
-
Sjoerd Mullender