Re: [GENERAL] Perl - Apache / Postgress - Mailing list pgsql-general

From Adriaan Joubert
Subject Re: [GENERAL] Perl - Apache / Postgress
Date
Msg-id 378C4E58.8751B0AA@albourne.com
Whole thread Raw
In response to Perl - Apache / Postgress  ("Erik Colson" <beaver@glo.be>)
List pgsql-general
> Erik Colson wrote:
>
> I'm using Apache with mod_perl to access a PostgresSQL database (6.5)
> .
>
> The script starts with connecting to the database... this means that
> the server is actually reconnecting everytime the script starts and
> disconnect when the HTML page is generated.
>
> I've read about a possibility to make a 'permanent' connection to the
> database ? Can anyone tell how ?

I've never used mod_perl, but I use FastCGI with CGI.pm, and that works
just great. In the CGI script you have a loop


<Connect to database>
while (my $q = new CGI::Fast) {
  <Handle CGI requests>
}

and this works just fine. The Apache fastCGI module is available from
www.fastcgi.com.

Adriaan

pgsql-general by date:

Previous
From: "Erik Colson"
Date:
Subject: Perl - Apache / Postgress
Next
From: Christopher Hutton
Date:
Subject: installing postgreSql