Re: connect from perl: error in Carp.pm

From: Brad Nicholson <bnichols(at)ca(dot)afilias(dot)info>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: connect from perl: error in Carp.pm
Date: 2005-05-06 15:59:16
Message-ID: 427B9454.5060701@ca.afilias.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Greg Sabino Mullane wrote:

>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>
>
>
>>When I try to connect as following, I get an error in Carp.pm:
>>
>>$dbh = DBI->connect("DBI:Pg:dbname=my_db", $username, $password,{AutoCommit
>>=> 1, RaiseError => }) || die "Unable to connect to database $DBI::errstr";
>>
>>=> Not a CODE reference at /usr/lib/perl5/5.8.3/Carp.pm line 178.
>>
>>
>
>
>
>>Maybe there are some right issue; I installed DBI and DBD as root, I'm
>>calling the script as root, but postgres runs under its own user.
>>
>>
>
>I doubt that's it, but I am not sure what is going on. Can you tell us more
>about the circumstances: is this a standalone script. Perhaps an Apache
>cgi script? What version of DBI, DBD::Pg, PostgreSQL, and (if applicable)
>Apache?
>
>

I'm going to go out on a limb here and guess that the problem is the
missing value for RaiseError in your connect statement.

--
Brad Nicholson 416-673-4106
Database Administrator, Afilias Canada Corp.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Bruno Wolff III 2005-05-06 16:02:28 Re: Execute function without execute privilege
Previous Message Tom Lane 2005-05-06 15:43:34 Re: Execute function without execute privilege