Thread: RE: RE: tourble migrating from linux/Apache/postgresql/p erl to win2000/IIS/postgresql/perl

SLao,

Let me try to clarify...the perl scripts try to load the Pg.pm module by
stating "use Pg".  You say this should be a binary file?  I found a few
copies of Pg.pm under .../perl/src or something like that, but it was ascii
text, I didn't dig too deep in to what it was doing.


I've found this http://www.edmund-mergl.de/export/DBD-Pg.zip from
symbolstone (http://dbi.symbolstone.org/cgi/moduledump?module=DBD::Pg)...
hopefully it's all I need.


If I install postgresql-7.1.2 from Jason and drop in the libpq.dll and
Pg.dll in my winnt/system32 should I be able to access my database from cgi
scripts with simply stating "use Pg"??

There seems to be something missing here...


-----Original Message-----
From: s0lao@netscape.net [mailto:s0lao@netscape.net]
Sent: Monday, June 11, 2001 12:33 AM
To: rsharma@bigstep.net
Cc: Jason.Tishler@dothill.com; pgsql-cygwin@postgresql.org
Subject: Re: [CYGWIN] RE: tourble migrating from
linux/Apache/postgresql/perl to win2000/IIS/postgresql/perl


[After the previous reply I've noticed your posts in pgsql-general]

To quote one of the answers there, Pg and DBD::Pg are completely different.
You weren't very clear what interface your scripts use. If you used DBI/DBD
postgres interface for your scripts, you don't need any perl tweak to your
PostgreSQL build. For a Pg module, you should either find a binary distro
which has it included (very hard -- as this should be a solver build -- like
in openoffice -- including the prebuild source tree) or to build it
yourself.

As a last comment, DBD::Pg would be a better bet, because its build is not
based on PostgreSQL source, but on a working binary distribution, with
libpq.dll and headers included. If you have problems with CPAN direct access
using Perl, there's always the ftp/http download alternative -- don't forget
the DBI module also.

                    SLao
__________________________________________________________________
Get your own FREE, personal Netscape Webmail account today at
http://webmail.netscape.com/

Re: RE: RE: tourble migrating from linux/Apache/postgresql/perl to win2000/IIS/postgresql/perl

From
s0lao@netscape.net (S. L.)
Date:
Rishi Sharma <rsharma@Bigstep.net> wrote:
>
> SLao,
>
> Let me try to clarify...the perl scripts try to load the Pg.pm module by
> stating "use Pg".  You say this should be a binary file?  I found a few
> copies of Pg.pm under .../perl/src or something like that, but it was ascii
> text, I didn't dig too deep in to what it was doing.
>

Ok, then it's clear your scripts are using the Pg driver bundled with PostgreSQL.

>
> I've found this http://www.edmund-mergl.de/export/DBD-Pg.zip from
> symbolstone (http://dbi.symbolstone.org/cgi/moduledump?module=DBD::Pg)...
> hopefully it's all I need.
>

From the point the above affirmation was made, any reference to DBI/DBD drivers becomes redundant. If your scripts use
thePg driver, migrating to DBI/DBD::Pg driver could be difficult, as they should be (quite some more than) batch
changed.

>
> If I install postgresql-7.1.2 from Jason and drop in the libpq.dll and
> Pg.dll in my winnt/system32 should I be able to access my database from cgi
> scripts with simply stating "use Pg"??
>
> There seems to be something missing here...
>

Maybe yet another comment :) You must not forget to place Pg.pm somewhere so that Perl is able to find it. I think the
layoutwith libpq.dll and pg.dll in winnt/system32 is viable. But, anyway, for any eventual problems, here's what "make
install"in "src/interfaces/perl" produces: 

$ ls -lR /usr/local/lib/perl5/site_perl/5.6.0/cygwin/
total 9
-r--r--r--   1 lao      544         18124 Sep 27  1998 Pg.pm
drwxr-xr-x   3 lao      544             0 Jun 11 08:57 auto

/usr/local/lib/perl5/site_perl/5.6.0/cygwin/auto:
total 0
drwxr-xr-x   2 lao      544             0 Jun 11 08:57 Pg

/usr/local/lib/perl5/site_perl/5.6.0/cygwin/auto/Pg:
total 83
-r--r--r--   1 lao      544             0 Jun 11 08:57 Pg.bs
-r-xr-xr-x   1 lao      544         73728 Jun 11 08:57 Pg.dll
-r--r--r--   1 lao      544            81 Jun 11 08:57 autosplit.ix
-r--r--r--   1 lao      544         93106 Jun 11 08:57 libPg.a

I think that a link to winnt/system32/Pg.dll in /usr/local/lib/perl5/site_perl/5.6.0/cygwin/auto/Pg could solve any
(eventual)Perl instalation issues. 

Good luck!

                        SLao
__________________________________________________________________
Get your own FREE, personal Netscape Webmail account today at http://webmail.netscape.com/