Thread: Pg module for Perl

Pg module for Perl

From
Barbara Lindsey
Date:
If this is the wrong list, let me know...
I am trying to install the Pg DBD module for Perl DBI and am having a
problem. It keeps coming up asking if I read the README file, which i have
several times.   The perl Makefile.PL and make seem to run without
problems, but the make test fails.  I have confirmed that Postgres is
running fine.  I've been able to create schema and tables and load data.
I have re-built Perl 5.8.2, I have installed PostgreSQL v7.4 and DBI-1.38.
Then I tried installing pgsql_perl5-1.9.0 and it just wont work.  Have I
picked up the wrong module?  Are there some specific configs required for
any of these to support the Pg DBD?
Any help appreciated.
Barb



Re: Pg module for Perl

From
Alex Satrapa
Date:
Barbara Lindsey wrote:
> I have re-built Perl 5.8.2, I have installed PostgreSQL v7.4 and DBI-1.38.
> Then I tried installing pgsql_perl5-1.9.0 and it just wont work.  Have I
> picked up the wrong module?  Are there some specific configs required for
> any of these to support the Pg DBD?

IIRC, the Pg module for Perl is quite distinct to DBD::Pg. You might be
trying to install the wrong module.

What do you mean by "it just won't work"?  If, after installing
pgsql_perl5-1.9.0, you get a message about not being able to find
"DBD::Pg in @INC", you've probably got the Pg module installed instead.
Try "man Pg", see if you've actually got the Pg module installed.

HTH
Alex


Re: Pg module for Perl

From
david@fetter.org (David Fetter)
Date:
Barbara Lindsey <blindsey@cog.ufl.edu> wrote:
> If this is the wrong list, let me know...

> I am trying to install the Pg DBD module for Perl DBI and am having
> a problem. It keeps coming up asking if I read the README file,
> which i have several times.   The perl Makefile.PL and make seem to
> run without problems, but the make test fails.  I have confirmed
> that Postgres is running fine.  I've been able to create schema and
> tables and load data.  I have re-built Perl 5.8.2, I have installed
> PostgreSQL v7.4 and DBI-1.38.  Then I tried installing
> pgsql_perl5-1.9.0 and it just wont work.  Have I picked up the wrong
> module?  Are there some specific configs required for any of these
> to support the Pg DBD?

> Any help appreciated.
> Barb

Barb,

Try setting $DBI_DSN to something like dbi:Pg:test before trying to
install DBD::Pg

in bash, that reads

export DBI_DSN=dbi:Pg:test

in (t)csh, it's

setenv DBI_DSN dbi:Pg:test

HTH :)

Cheers,
David.
--
David Fetter david@fetter.org http://fetter.org/
phone: +1 510 893 6100    cell: +1 415 235 3778

On two occasions I have been asked [by members of Parliament], 'Pray,
Mr.  Babbage, if you put into the machine wrong figures, will the
right answers come out?'  I am not able rightly to apprehend the kind
of confusion of ideas that could provoke such a question.
                                                    Charles Babbage

Re: Pg module for Perl

From
Barbara Lindsey
Date:
I think you are right!
I originally went to the Perl Module list on CPAN and looked for DBD and Pg.
It gave me the pgsql_perl5.1.9.0 link

However, when I searched for DBD Pg on Google, it led me to a DBD-Pg-1.22

I think that is what I was looking for. Will give it a try tonight.
Thanks!
Barb

Alex Satrapa wrote:
> Barbara Lindsey wrote:
>
>> I have re-built Perl 5.8.2, I have installed PostgreSQL v7.4 and
>> DBI-1.38.
>> Then I tried installing pgsql_perl5-1.9.0 and it just wont work.  Have I
>> picked up the wrong module?  Are there some specific configs required for
>> any of these to support the Pg DBD?
>
>
> IIRC, the Pg module for Perl is quite distinct to DBD::Pg. You might be
> trying to install the wrong module.
>
> What do you mean by "it just won't work"?  If, after installing
> pgsql_perl5-1.9.0, you get a message about not being able to find
> "DBD::Pg in @INC", you've probably got the Pg module installed instead.
> Try "man Pg", see if you've actually got the Pg module installed.
>
> HTH
> Alex
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org



--
Barbara E. Lindsey,
COG RDC
Phone: (352) 392-5198 ext. 314     Fax: (352) 392-8162

----
CONFIDENTIALITY NOTICE: The information contained in this electronic
message is legally privileged and confidential and intended only for the
use of the individual(s) or entity(ies) named above.  If the reader of
this message is not the intended recipient, you are hereby notified that
any dissemination, distribution, or copying of this email or any of it's
components is strictly prohibited.  If you have received this email in
error, please contact the sender.
----


Re: Pg module for Perl

From
"Roderick A. Anderson"
Date:
On Mon, 1 Dec 2003, Barbara Lindsey wrote:

> However, when I searched for DBD Pg on Google, it led me to a DBD-Pg-1.22

Try

    http://search.cpan.org/~rudy/DBD-Pg-1.31/Pg.pm

Not sure if there are a lot of dependency issues going to Pg 7.4 as I'm in
the process upgrading to 7.4 and all it's friends.

One other issue that comes when installing DBI and/or DBD is the from the
current (1.31) README file.

...

INSTALLATION:
-------------

By default Makefile.PL uses App:Info to find the location of the
PostgreSQL library and include directories.  However, if you want to
control it yourself, define the environment variables POSTGRES_INCLUDE
and POSTGRES_LIB, or POSTGRES_HOME. Note that if you've compiled
PostgreSQL with SSL support, you must define the POSTGRES_LIB
environment varable and add "-lssl" to it, like this:

    export POSTGRES_LIB="/usr/local/pgsql/lib -lssl"

...

Good luck to us both.


Rod
--
  "Open Source Software - Usually you get more than you pay for..."
   "Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL"



Re: Pg module for Perl [SUCCESS]

From
Barbara Lindsey
Date:
This was perfect. I also had to set the DBI_* envs.  See test results
below.  I then installed and successfully ran my own test.
Thanks to all who replied!
Barb

Test Results:
$ make test
PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00basic...........ok
t/01connect.........ok 2/2#
# Package       Version
# DBD::Pg       1.31
# DBI           1.38
# Postgres      7.4
t/01connect.........ok
t/01constants.......ok
t/01setup...........ok
t/02prepare.........ok
t/03bind............ok
t/04execute.........ok
t/04rows............ok
t/05fetch...........ok
t/06disconnect......ok
t/07reuse...........ok
t/08txn.............ok
t/09autocommit......ok
t/10chopblanks......ok
t/11quoting.........ok
t/12placeholders....ok
t/13pgtype..........ok
t/15column_info.....ok
t/15funct...........ok
t/15table_attrs.....ok
t/15table_info......ok
t/16pgbooltf........# DBD::Pg version: 1.31
t/16pgbooltf........ok
t/17arrays..........ok
t/99_pod............skipped
        all skipped: Test::Pod 1.00 required for testing POD
t/99cleanup.........ok
All tests successful, 1 test skipped.
Files=25, Tests=268, 34 wallclock secs (10.72 cusr +  0.99 csys = 11.71 CPU)

:)

> On Mon, 1 Dec 2003, Barbara Lindsey wrote:
>
>> However, when I searched for DBD Pg on Google, it led me to a
>> DBD-Pg-1.22
>
> Try
>
>     http://search.cpan.org/~rudy/DBD-Pg-1.31/Pg.pm
>
> Not sure if there are a lot of dependency issues going to Pg 7.4 as I'm
> in  the process upgrading to 7.4 and all it's friends.
>
> One other issue that comes when installing DBI and/or DBD is the from
> the  current (1.31) README file.
>
> ...
>
> INSTALLATION:
> -------------
>
> By default Makefile.PL uses App:Info to find the location of the
> PostgreSQL library and include directories.  However, if you want to
> control it yourself, define the environment variables POSTGRES_INCLUDE
> and POSTGRES_LIB, or POSTGRES_HOME. Note that if you've compiled
> PostgreSQL with SSL support, you must define the POSTGRES_LIB
> environment varable and add "-lssl" to it, like this:
>
>     export POSTGRES_LIB="/usr/local/pgsql/lib -lssl"
>
> ...
>
> Good luck to us both.
>
>
> Rod
> --
>   "Open Source Software - Usually you get more than you pay for..."
>    "Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL"
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster