Re: [HACKERS] Suitable Driver ?

2001-10-11 Thread Alex Pilosov

On Thu, 11 Oct 2001, Balaji Venkatesan wrote:

 Now i need to install DBD For PGSQL .Is
 this the driver i have to work on for pgsql ?.
 Or do I have any other option to connect to pgsql
 from perl . Indeed i've found out an other way
 to use Pg driver provided by PGSQL to interface
 perl with pgsql.
You need DBD::Pg, which is a DBD driver for postgres.

 
 I need to exactly know the difference between
 use Pg ; and use DBI ; Need to which one is
 proceeding towards correct direction under what circumstances.
You need use DBI; and use DBD::Pg;
Pg by itself is slightly lower-level module that is similar to C interface
to postgresql.

 when I tried to install DBD-Pg-0.93.tar.gz under Linux
 i get
 
 Configuring Pg
 Remember to actually read the README file !
 please set environment variables POSTGRES_INCLUDE and POSTGRES_LIB !
 
 I need to know what these varibles POSTGRES_INCLUDE and POSTGRES_LIB
 should point to ...
To location of your installed postgres includes' and libraries
For example:

export POSTGRES_INCLUDE=/usr/local/pgsql/include
export POSTGRES_LIB=/usr/local/pgsql/lib

-alex


---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



Re: [HACKERS] Suitable Driver ?

2001-10-11 Thread Tom Lane

Balaji Venkatesan [EMAIL PROTECTED] writes:
 I have installed latest DBI from www.cpan.org
 Now i need to install DBD For PGSQL .Is
 this the driver i have to work on for pgsql ?.

If you want to use DBI then you should get the DBD::Pg driver from
CPAN.  (Yes, it is on CPAN, even though their index page about DBD
modules didn't list it last time I looked.)

 I need to exactly know the difference between
 use Pg ; and use DBI ; Need to which one is

Pg is a older stand-alone driver; it's not DBI-compatible,
and it's got nothing to do with DBD::Pg.

regards, tom lane

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



[HACKERS] Suitable Driver ?

2001-10-10 Thread Balaji Venkatesan

HI
I have to setup PERL to interact with PGSQL.
I have taken the following steps.

1.Installation of perl_5.6.0 under Redhat Linux 7.0
2.Installation of POSTGRESQL under Redhat Linux7.0

Both are working perfectly as seperate modules.

Now I need to interface perl with PGSQL.

I need to what's the best possible soln.

I have installed latest DBI from www.cpan.org

Now i need to install DBD For PGSQL .Is
this the driver i have to work on for pgsql ?.
Or do I have any other option to connect to pgsql
from perl . Indeed i've found out an other way
to use Pg driver provided by PGSQL to interface
perl with pgsql.

I need to exactly know the difference between
use Pg ; and use DBI ; Need to which one is
proceeding towards correct direction under what circumstances.


when I tried to install DBD-Pg-0.93.tar.gz under Linux
i get

Configuring Pg
Remember to actually read the README file !
please set environment variables POSTGRES_INCLUDE and POSTGRES_LIB !

I need to know what these varibles POSTGRES_INCLUDE and POSTGRES_LIB
should point to ...

and when i tried to run perl test.pl, the program to test the
installation of the module which
comes with the tar.
 I get the error

OS: linux
install_driver(Pg) failed: Can't locate DBD/Pg.pm in @INC (@INC
contains: /usr/l
ib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0
/usr/lib/perl5/site_perl/5.6.0/i3
86-linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl .)
at (eval 1)
line 3.
Perhaps the DBD::Pg perl module hasn't been fully installed,
or perhaps the capitalisation of 'Pg' isn't right.
Available drivers: ADO, ExampleP, Multiplex, Proxy.
 at test.pl line 51

Any body who can clarify is most welcome

with regards,
Prassanna...


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])