Re: Problems with new DBD

Поиск
Список
Период
Сортировка
От Jeff Duffy
Тема Re: Problems with new DBD
Дата
Msg-id 200104190029.f3J0T6u21764@postgresql.org
обсуждение исходный текст
Ответ на Problems with new DBD  (Glen Eustace <geustace@godzone.net.nz>)
Список 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@greatbridge.com


В списке pgsql-general по дате отправления:

Предыдущее
От: Glen Eustace
Дата:
Сообщение: Problems with new DBD
Следующее
От: "Brett W. McCoy"
Дата:
Сообщение: Re: Problems with new DBD