Skip to Content.
Sympa Menu

devel - Re: [sympa-dev] WG: List.pm::db_connect with Postgresql V 7.1 Error

Subject: Developers of Sympa

List archive

Chronological Thread  
  • From: Olivier Salaun <address@concealed>
  • To: address@concealed, Straub Herbert <address@concealed>
  • Cc: Laurent LAVAUD <address@concealed>
  • Subject: Re: [sympa-dev] WG: List.pm::db_connect with Postgresql V 7.1 Error
  • Date: Thu, 17 May 2001 11:11:58 +0200

> Straub Herbert wrote:
>
> 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 ----

We already changed the connect string for PostgreSQL in Sympa 2.5.4b
(March 2000).
It had been proposed by Laurent LAVAUD to change the connect string to :
DBI:$db_type:dbname=$db_name\@$host

Are you sure your proposed connect string (the default one) will work
with
older versions of PostgreSQL ?

Note that List.pm has also connect strings in _include_users_sql().

--
Olivier Salaün
Comité Réseau des Universités



Archive powered by MHonArc 2.6.19+.

Top of Page