From: | "Jeff Duffy" <jeff(at)alanne(dot)com> |
---|---|
To: | Glen Eustace <geustace(at)godzone(dot)net(dot)nz>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Problems with new DBD |
Date: | 2001-04-18 20:28:58 |
Message-ID: | 200104190029.f3J0T6u21764@postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, 19 Apr 2001 10:52:31 +1200, Glen Eustace alluded:
> I have just upgraded to the new DBD, but am still using postgresql 7.0.3
>
> I am now getting access errors. I have had to go back into the db and
> GRANT ALL on <ALL> to PUBLIC as a work around.
>
> Even though I have specified a userid and password on the DBI->connect,
> Pg seems to be using the actual user.
There's a bug in the authentication code in DBD::Pg 0.96. Here's a patch:
--- Pg.dist Wed Apr 18 20:18:18 2001
+++ Pg.pm Wed Apr 18 20:20:18 2001
@@ -79,11 +79,11 @@
$Name =~ s/^.*dbname\s*=\s*//;
$Name =~ s/\s*;.*$//;
+ $user = $ENV{DBI_USER} unless defined($user) and length($user);
+ $auth = $ENV{DBI_PASS} unless defined($auth);
+
$user = "" unless defined($user);
$auth = "" unless defined($auth);
-
- $user = $ENV{DBI_USER} unless $user eq "";
- $auth = $ENV{DBI_PASS} unless $auth eq "";
my($dbh) = DBI::_new_dbh($drh, {
'Name' => $Name,
Jeff Duffy
jduffy(at)greatbridge(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | msteele | 2001-04-18 20:29:58 | Inheritance question |
Previous Message | Bryan White | 2001-04-18 20:27:37 | Re: corrupted database? |