Skip site navigation (1) Skip section navigation (2)

Perl DBI Module fails to install correctly from RPM

From: pgsql-bugs(at)postgresql(dot)org
To: pgsql-bugs(at)postgresql(dot)org
Subject: Perl DBI Module fails to install correctly from RPM
Date: 2001-07-07 00:54:48
Message-ID: 200107070054.f670smS06070@hub.org (view raw or flat)
Thread:
Lists: pgsql-bugs
Chris Carkner (almohada(at)hotmail(dot)com) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Perl DBI Module fails to install correctly from RPM

Long Description
I installed version 7.1.2 from RPMs from your FTP site specifically with the following files (not necessarily in this order):

postgresql-7.1.2-4PGDG.i386.rpm
postgresql-docs-7.1.2-4PGDG.i386.rpm
postgresql-libs-7.1.2-4PGDG.i386.rpm
postgresql-perl-7.1.2-4PGDG.i386.rpm
postgresql-server-7.1.2-4PGDG.i386.rpm

After copying the Pg.pm file to the appropriate DBD subdirectory (which it wasn't in with the rest of the drivers) which I assumed was the problem I tried to run a perl script which is trying to connect.  This script worked on Red Hat 6.2 just fine, but when I tried to bring it to 7.1 and connect, I got the following (spelling errors and typos are not mine):

DBD::Pg initialisation failed: Can't locate object method "driver" via package "DBD::Pg" at /usr/lib/perl5/site_perl/5.6.0/i386-linux/DBI.pm line 511.
Perhaps the capitalisation of DBD 'Pg' isn't right. at perlfile.pl line 141.

The line it is complaining about it a straight copy of the test.pl file contained with the module.  And yes, the database does exist, I double checked. 

I included the snippet of perl to which the above error belongs.

Sample Code
use DBI;
use Cwd;

$dir = cwd();

$connect_string = "dbi:Pg:dbname=foo";

my $dbh = DBI->connect($connect_string, '', '', {AutoCOmmit => 1})
          or die "Couldn't connect to database: " . DBI->errstr;

No file was uploaded with this report


Responses

pgsql-bugs by date

Next:From: pgsql-bugsDate: 2001-07-07 01:31:30
Subject: can't create timestamp field (only timestamp with time zone)
Previous:From: José María Fernández GonzálezDate: 2001-07-06 19:29:09
Subject: Re: Referential Integrity corrupted sometimes by Rules

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group