|
From: Nicolas L. <nla...@pe...> - 2001-08-01 22:03:16
|
Well. I ran the nifty lil script. I gave me the feedback "posgres" Does that
mean that it's working fine?
----- Original Message -----
From: "Thomas Good" <to...@ad...>
To: <sql...@li...>
Sent: Wednesday, August 01, 2001 4:02 PM
Subject: Re: DBD::Pg...what I need?
> On Wed, 1 Aug 2001, Nicolas Lafferty wrote:
>
> > Well. I have DBI installed. And Pg. Still no dice. See my just posted
> > Subject "Pg not the problem" on the list. Hrmph. This is driving me
nuts.
>
> So, I'm unclear. Can you connect to Pg using DBI at all?
> If not sure save the following as test.pl, make executable (chmod 755
test.pl)
> and run it from the shell prompt: ./test.pl
>
> #!/usr/bin/perl
> use DBI;
>
> $dbh = DBI->connect("dbi:Pg:dbname=template1", '', '') || die
"$DBI::errstr";
> $query = qq |select usename from pg_user|;
> $sth=$dbh->prepare($query);
> $sth->execute || die "$DBI::errstr";
> @row=$sth->fetchrow_array;
> $sth->finish;
> $dbh->disconnect;
>
> print "\n@row\n\n";
>
>
>
|