Subject: Developers of Sympa
List archive
WG: List.pm::db_connect with Postgresql V 7.1 Error
- From: Straub Herbert <address@concealed>
- To: "'address@concealed'" <address@concealed>
- Subject: WG: List.pm::db_connect with Postgresql V 7.1 Error
- Date: Thu, 17 May 2001 09:00:28 +0200
Title: WG: List.pm::db_connect with Postgresql V 7.1 Error
The DBD::Pg PostgreSQL database driver for the DBI module says:
connect:
The following connect statement shows all possible parameters:
$dbh = DBI->connect("dbi:Pg:dbname=$dbname;host=$host;port=$port;options=$options;tty=$tty", "$username", "$password");
Therefore I think, the elsif path for db_type eq 'Pg' is obsolete.
I suggest the following patch (List.pm.orig is from the CVS Web V1.87):
*** List.pm.orig Thu May 17 07:58:10 2001
--- List.pm Thu May 17 07:58:34 2001
***************
*** 715,723 ****
}elsif ($Conf{'db_type'} eq 'Sybase') {
$connect_string = sprintf 'DBI:%s:dbname=%s;server=%s', $Conf{'db_type'}, $Conf{'db_name'}, $Conf{'db_host'};
- }elsif ($Conf{'db_type'} eq 'Pg') {
- $connect_string = sprintf 'DBI:%s:dbname=%s\@%s', $Conf{'db_type'}, $Conf{'db_name'}, $Conf{'db_host'};
-
}else {
$connect_string = sprintf 'DBI:%s:dbname=%s;host=%s', $Conf{'db_type'}, $Conf{'db_name'}, $Conf{'db_host'};
}
--- 715,720 ----
Herbert Straub
-----Originalnachricht-----
Von: Straub Herbert
An: 'address@concealed'
Gesendet: 16.05.01 12:45
Betreff: List.pm::db_connect with Postgresql V 7.1 Error
I use debian sid (unstable) and after the last upgrade the following
error occured (sympa.log)
May 16 12:19:55 koala postgres[16693]: [1] DEBUG: connection:
host=[local] user=sympa database=sympa@localhost
May 16 12:19:55 koala postgres[16693]: [2] FATAL 1: Database
"sympa@localhost" does not exist in the system catalog.
May 16 12:19:55 koala bounced[16690]: Can't connect to Database
DBI:Pg:dbname=sympa\@localhost as sympa
I changed the connect string in List::db_connect
from
$connect_string = sprintf 'DBI:%s:dbname=%s\@%s', $Conf{'db_type'},
$Conf{'db_name'}, $Conf{'db_host'};
to
$connect_string = sprintf 'DBI:%s:dbname=%s;host=%s', $Conf{'db_type'},
$Conf{'db_name'}, $Conf{'db_host'};
for the db_type "Pg" and then sympa works.
Versions:
Debian: sid
Desired=Unknown/Install/Remove/Purge/Hold
|
Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err:
uppercase=bad)
||/ Name Version Description
+++-==============-==============-======================================
======
ii sympa 3.0.3-5 Modern mailing list manager
ii sympa-db 3.0.3-5 Database support for Sympa
ii wwsympa 3.0.3-5 Web interface for administrating Sympa
ii postgresql 7.1.1-2 Object-relational SQL database,
descended fr
ii postgresql-cli 7.1.1-2 Front-end programs for PostgreSQL
ii postgresql-doc 7.1.1-2 Documentation for the PostgreSQL
database.
ii libdbi-perl 1.15-1 The Perl5 Database Interface by Tim
Bunce
ii libdbd-pg-perl 0.98-1 a PostgreSQL interface for Perl 5
using DBI.
Herbert Straub
-
WG: List.pm::db_connect with Postgresql V 7.1 Error,
Straub Herbert, 05/17/2001
- Re: [sympa-dev] WG: List.pm::db_connect with Postgresql V 7.1 Error, Olivier Salaun, 05/17/2001
Archive powered by MHonArc 2.6.19+.