You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "Fabiàn R. Breschi" <fa...@computer.org> on 2002/08/15 12:32:16 UTC

Re: Three tier computing: suggestion needed for DBI connection.

After digging more docs, finally found for PG DBI:

DBI:Pg:dbname=mydb;host=Ultra1;port=5432

question 2 still there, thanks.

Fabian.


"Fabián R. Breschi" wrote:

> Hello all,
>
> At the moment I'm running Apache 1.3.12+mod_perl 1.27 with PG 7.2.1
> via DBI-DBD on a SS5 Solaris 2.6 machine.
>
> I'd like to separate the database engine from the Apache environment
> so, running Apache+mod_perl+DBI+DBD on the front end and PostgreSQL at
> the backend (hope I'm right with this particular interpretation of
> 3tier and split of modules...)
>
> I have glanced around for DBI connect scenarios but could not find any
> useful example.
>
> My questions are:
>
> - How do I setup my connection string from
> $dbh=DBI->connect('DBI:Pg:dbname=mydb','login','password') to include
> in my 'dbname' the host name i.e. 'dbname=mydb@Ultra1' being Ultra1 a
> fully qualified alias into my hosts table,
> - Providing the above is possible, I imagine that leaving PG installed
> at the front end it could only be useful for 'psql -h Ultra1 mydb' but
> not necessarily used for DBI?
>
> Any suggestions are much appreciated.
>
> Fabian.



Re: Three tier computing: suggestion needed for DBI connection.

Posted by "Fabiàn R. Breschi" <fa...@computer.org>.
Thanks Eric,

..so, I could define at the backend my envvars:

POSTGRES_INCLUDE=../psql/include
POSTGRES_LIB=../psql/lib

I imagine, hopefully, using the same OS on the backend (Sol2.6), I could only
copy these two dirs from the frontend without recompiling PG again.

That's all that I wanted.

Many thanks again,

Fabian.

Eric Cholet wrote:

> --On Thursday, August 15, 2002 12:32:16 +0200 "Fabiàn R. Breschi"
> <fa...@computer.org> wrote:
>
> > After digging more docs, finally found for PG DBI:
> >
> > DBI:Pg:dbname=mydb;host=Ultra1;port=5432
> >
> > question 2 still there, thanks.
>
> All you need is the pgsql/lib and pgsql/include directories so that you can
> install DBD::Pg.
>
> >
> > Fabian.
> >
> >
> > "Fabián R. Breschi" wrote:
> >
> >> Hello all,
> >>
> >> At the moment I'm running Apache 1.3.12+mod_perl 1.27 with PG 7.2.1
> >> via DBI-DBD on a SS5 Solaris 2.6 machine.
> >>
> >> I'd like to separate the database engine from the Apache environment
> >> so, running Apache+mod_perl+DBI+DBD on the front end and PostgreSQL at
> >> the backend (hope I'm right with this particular interpretation of
> >> 3tier and split of modules...)
> >>
> >> I have glanced around for DBI connect scenarios but could not find any
> >> useful example.
> >>
> >> My questions are:
> >>
> >> - How do I setup my connection string from
> >> $dbh=DBI->connect('DBI:Pg:dbname=mydb','login','password') to include
> >> in my 'dbname' the host name i.e. 'dbname=mydb@Ultra1' being Ultra1 a
> >> fully qualified alias into my hosts table,
> >> - Providing the above is possible, I imagine that leaving PG installed
> >> at the front end it could only be useful for 'psql -h Ultra1 mydb' but
> >> not necessarily used for DBI?
> >>
> >> Any suggestions are much appreciated.
> >>
> >> Fabian.
> >
>
> --
> Eric Cholet



Re: Three tier computing: suggestion needed for DBI connection.

Posted by "Fabiàn R. Breschi" <fa...@computer.org>.
OOPS,

I have made a little confusion.

I just wanted to say that those envvars are needed ONLY on the at the
front end to correctly compile DBD if that is the case. Anyway, I could
recover the related dirs from the old front end installation with no
recompilation of PG.

F.

Thanks Eric,

..so, I could define at the backend my envvars:

POSTGRES_INCLUDE=../psql/include
POSTGRES_LIB=../psql/lib

I imagine, hopefully, using the same OS on the backend (Sol2.6), I could
only
copy these two dirs from the frontend without recompiling PG again.

That's all that I wanted.

Many thanks again,

Fabian.

Eric Cholet wrote:

> --On Thursday, August 15, 2002 12:32:16 +0200 "Fabiàn R. Breschi"
> <fa...@computer.org> wrote:
>
> > After digging more docs, finally found for PG DBI:
> >
> > DBI:Pg:dbname=mydb;host=Ultra1;port=5432
> >
> > question 2 still there, thanks.
>
> All you need is the pgsql/lib and pgsql/include directories so that you can
> install DBD::Pg.
>
> >
> > Fabian.
> >
> >
> > "Fabián R. Breschi" wrote:
> >
> >> Hello all,
> >>
> >> At the moment I'm running Apache 1.3.12+mod_perl 1.27 with PG 7.2.1
> >> via DBI-DBD on a SS5 Solaris 2.6 machine.
> >>
> >> I'd like to separate the database engine from the Apache environment
> >> so, running Apache+mod_perl+DBI+DBD on the front end and PostgreSQL at
> >> the backend (hope I'm right with this particular interpretation of
> >> 3tier and split of modules...)
> >>
> >> I have glanced around for DBI connect scenarios but could not find any
> >> useful example.
> >>
> >> My questions are:
> >>
> >> - How do I setup my connection string from
> >> $dbh=DBI->connect('DBI:Pg:dbname=mydb','login','password') to include
> >> in my 'dbname' the host name i.e. 'dbname=mydb@Ultra1' being Ultra1 a
> >> fully qualified alias into my hosts table,
> >> - Providing the above is possible, I imagine that leaving PG installed
> >> at the front end it could only be useful for 'psql -h Ultra1 mydb' but
> >> not necessarily used for DBI?
> >>
> >> Any suggestions are much appreciated.
> >>
> >> Fabian.
> >
>
> --
> Eric Cholet


Re: Three tier computing: suggestion needed for DBI connection.

Posted by Eric Cholet <ch...@logilune.com>.
--On Thursday, August 15, 2002 12:32:16 +0200 "Fabiàn R. Breschi" 
<fa...@computer.org> wrote:

> After digging more docs, finally found for PG DBI:
>
> DBI:Pg:dbname=mydb;host=Ultra1;port=5432
>
> question 2 still there, thanks.

All you need is the pgsql/lib and pgsql/include directories so that you can
install DBD::Pg.

>
> Fabian.
>
>
> "Fabián R. Breschi" wrote:
>
>> Hello all,
>>
>> At the moment I'm running Apache 1.3.12+mod_perl 1.27 with PG 7.2.1
>> via DBI-DBD on a SS5 Solaris 2.6 machine.
>>
>> I'd like to separate the database engine from the Apache environment
>> so, running Apache+mod_perl+DBI+DBD on the front end and PostgreSQL at
>> the backend (hope I'm right with this particular interpretation of
>> 3tier and split of modules...)
>>
>> I have glanced around for DBI connect scenarios but could not find any
>> useful example.
>>
>> My questions are:
>>
>> - How do I setup my connection string from
>> $dbh=DBI->connect('DBI:Pg:dbname=mydb','login','password') to include
>> in my 'dbname' the host name i.e. 'dbname=mydb@Ultra1' being Ultra1 a
>> fully qualified alias into my hosts table,
>> - Providing the above is possible, I imagine that leaving PG installed
>> at the front end it could only be useful for 'psql -h Ultra1 mydb' but
>> not necessarily used for DBI?
>>
>> Any suggestions are much appreciated.
>>
>> Fabian.
>



--
Eric Cholet