|
From: Thomas G. <to...@ad...> - 2001-10-30 17:59:31
|
On Tue, 30 Oct 2001, Oscar Buijten wrote:
> HI Thomas,
Hey Oscar,
> I have tried to re_install DBD several times and in several ways. It is=
=20
> there. So that doesn't seem to be the issue.
Did you build DBI and DBD from the src tarball?
You see I'm wondering if you didn't install (via rpm) a mismatched version.
I dunno if Redhat is up to 5.6.1 * or * if Lamar Owen used it when he
built the postgresql rpms. If memory serves you said that this all
started when you moved to 5.6.1 so Dieter could be right that simply
building DBI and DBD from source could fix it. This is relatively
painless.
If you have a simple script, say:
---------------------------------- cut here -----------------------------
#!/usr/bin/perl
use DBI;
$dbh =3D DBI->connect("dbi:Pg:dbname=3Dtemplate1", '', '') || die "$DBI::er=
rstr";
$query =3D "select current_time";
$sth =3D $dbh->prepare($query);
$sth->execute || die "$DBI::errstr";
$time =3D $sth->fetchrow_array;
$sth->finish;
$dbh->disconnect;
print "\nThe time is: $time\n";
---------------------------------- and here -----------------------------
and you run it...it should prove interesting to see if perl complains
about DBI. If this works, then we need to dig deeper.
> I want to go for an Pg upgrade now.
> How do I know which rpm's are installed?
rpm -qa | grep postgresql=20
> Does it matter anyway? Can I just guess them as per your script?
> How am I sure all is gone?
Right. Edit my script to match what you installed or make your own:
rpm -qa | grep postgresql > remove.sh
NOTE: you have to remove the server (base package) last or you=20
will get dependency complaints from redhat. Or use
rpm -e --nodeps postgresql-whatever
> Will I get hassle with environment variables? Anything else?
=20
No. This won't change. Redhat dumps everything in
/usr/lib or /usr/include/pgsql.
> But my basic question is really: why doesn't sql-ledger work and why do=
=20
> all the other dbase web apps???
=20
Well, for whatever reason, DBI and DBD-Pg sometimes seem to give people
headaches. Maybe your other apps don't use perl? Or they don't use
DBI. A version mismatch could be the culprit. I think Dieter is right
that you want to find out why perl is unhappy...=20
Once we get this fixed, then do an upgrade. If necessary you leave
out the postgresql-perl package and build the DBI drivers from source.
So, let's see if the above mentioned 'hello world' script produces
an error.
> Thanks so far!
Glad to be of service. ;-)
--------------------------------------------------------------------
Saint Vincent Catholic Medical Centers =20
--------------------------------------------------------------------
Thomas Good tomg@ { admin | q8 } .nrnet.org
Programmer/Analyst Phone: 718-818-5528=20
Behavioral Health Services Fax: 718-818-5056 =20
Residential Services Mobile: 917-282-7359 =20
--------------------------------------------------------------------
/* Rekordmeister ist nur der FC Bayern M=FCnchen! */
--------------------------------------------------------------------
|