From: | "Brett W(dot) McCoy" <bmccoy(at)chapelperilous(dot)net> |
---|---|
To: | Glen Eustace <geustace(at)godzone(dot)net(dot)nz> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Problems with new DBD |
Date: | 2001-04-19 01:38:54 |
Message-ID: | Pine.LNX.4.30.0104182137390.21134-100000@chapelperilous.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, 19 Apr 2001, Glen Eustace wrote:
> 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.
>
> NB: I didn't change any of my code, just upgraded to DBD 0.96, I have
> since upgraded to DBI 1.15 but that hasn't helped.
There's a bug in Pg::DBD 0.96. Here's the patch:
*** DBD-Pg-0.96/Pg.pm-orig Tue Apr 10 03:44:18 2001
--- DBD-Pg-0.96/Pg.pm Sun Apr 15 10:26:16 2001
***************
*** 79,89 ****
$Name =~ s/^.*dbname\s*=\s*//;
$Name =~ s/\s*;.*$//;
! $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,
--- 79,88 ----
$Name =~ s/^.*dbname\s*=\s*//;
$Name =~ s/\s*;.*$//;
! $user ||= $ENV{DBI_USER};
! $auth ||= $ENV{DBI_PASS};
! $user ||= "";
! $auth ||= "";
my($dbh) = DBI::_new_dbh($drh, {
'Name' => $Name,
http://www.chapelperilous.net/btfwk/
------------------------------------------------------------------------
It's amazing how many people you could be friends with if only they'd
make the first approach.
From | Date | Subject | |
---|---|---|---|
Next Message | Ryan Campbell | 2001-04-19 02:07:30 | Flattening a subquery |
Previous Message | Glen Eustace | 2001-04-18 22:52:31 | Problems with new DBD |