Re: connect to a remote Postgresql server using DBI

From: Alec Brecher (alec_at_eresearchresources.com)
Date: 03/04/05

  • Next message: Hardy Merrill: "Re: connect to a remote Postgresql server using DBI"
    To:        <dbi-users@perl.org>
    Date: Fri, 4 Mar 2005 12:59:01 -0500
    
    

    You need all the layers compiled on windows or *nix to make it work:
    DBI
    DBD::Pg
    PostgreSQL client library.

    If you are installing on Windows be sure to read the windows readme when installing the PostgreSQL client. It is a bit tricky.

    -Alec

     On Fri, 4 Mar 2005 09:48:36 -0800 (PST), Gokul P. Nair wrote:
    > Thanks very much for ur response, i have one more question though.
    > Isn't there some kind of arrangement like MS ODBC where u just
    > download the driver for the specific database and then create a DSN
    > (data source name) and write ur scripts (perl script or anything
    > else) to execute queries on the remote database. Do i have to
    > download and install the database driver as well as client
    > libraries for each computer running the perl script to execute
    > queries on the remote server? What if i were to run these perl
    > scripts on a windows machine, would downloading and installing the
    > driver alone not suffice?
    >
    > Thanks again.
    > Gokul
    >
    > --- Alec Brecher <alec@eresearchresources.com> wrote:
    >
    >> You need to install the PostgreSQL client libraries on the box
    >> running DBD::Pg.  The client libraries need to be installed
    >> before installing DBD::Pg.
    >>
    >> See the bottom of this page for client installation directions.
    >>
    http://www.postgresql.org/docs/7.4/static/install-procedure.html
    >
    >> -Alec
    >>
    >> On Thu, 3 Mar 2005 21:08:27 -0800 (PST), Gokul P. Nair wrote:
    >>
    >>> i would like to connect to a remote postgresql 8.1
    >>>
    >> server using a
    >>> perl script. The machine i'm trying to connect
    >>>
    >> from is running
    >>> Debian and perl v5.6.1. In order to connect to the
    >>>
    >> remote
    >>> postgresql server i assume i need DBI as well as
    >>>
    >> DBD::Pg. well the
    >>> DBI installation went well but when i try to
    >>>
    >> install DBD::Pg this
    >>> is what it gives me:
    >>>
    >>> debian:/usr/local/src/DBD-Pg-1.40# perl
    >> Makefile.PL Configuring Pg
    >>> Remember to actually read the README file! Path to
    >>>
    >> pg_config? OS:
    >>> linux PostgreSQL version: ..
    >>>
    >>> ****************
    >>> WARNING! DBD::Pg no longer supports versions less
    >>>
    >> than 7.2.
    >>> It is highly recommended that you upgrade
    >>>
    >> PostgreSQL to a newer
    >>> version. ****************
    >>>
    >>> Using DBI 1.47 (for perl 5.006001 on i386-linux)
    >>>
    >> installed in
    >>> /usr/local/lib/perl/5.6.1/auto/DBI/ Checking if
    >>>
    >> your kit is
    >>> complete... Looks good
    >>> Note (probably harmless): No library found for
    >>>
    >> -lpq Using DBI 1.47
    >>> (for perl 5.006001 on i386-linux) installed in
    >>> /usr/local/lib/perl/5.6.1/auto/DBI/ Writing
    >>>
    >> Makefile for DBD::Pg
    >>
    >>> Do i even need DBD::Pg installed on the machine
    >>>
    >> which is trying to
    >>> access the postgresql server through a perl
    >>>
    >> script? if so why is
    >>> the very first step i.e. "perl Makefile.pl"
    >>>
    >> failing? if no, how do
    >>> i connect to the server and run queries using
    >>>
    >> perl?
    >>
    >>> thanks in advance for all ur help.
    >>>
    >>> Gokul
    >>>
    >>>
    >>> __________________________________________________
    >>>
    >> Do You Yahoo!?
    >>> Tired of spam?  Yahoo! Mail has the best spam
    >>>
    >> protection around
    >>> http://mail.yahoo.com
    >
    >
    > __________________________________
    > Celebrate Yahoo!'s 10th Birthday!
    > Yahoo! Netrospective: 100 Moments of the Web
    http://birthday.yahoo.com/netrospective/


  • Next message: Hardy Merrill: "Re: connect to a remote Postgresql server using DBI"

    Relevant Pages

    • Re: IE Scripts cause machine to reboot
      ... >>> After installing SP2 my computer now reboots if I browse (using ... >>> This includes attempting to run windows update. ... >>> second script IE asks me to allow to run). ... >>> After installing the OS I run windows ...
      (microsoft.public.windowsxp.help_and_support)
    • Re: IE Scripts cause machine to reboot
      ... > This includes attempting to run windows update. ... > second script IE asks me to allow to run). ... sits for 3-4seconds and then reboots. ... > After installing the OS I run windows ...
      (microsoft.public.windowsxp.help_and_support)
    • IE Scripts cause machine to reboot
      ... After installing SP2 my computer now reboots if I browse (using Internet ... This includes attempting to run windows update. ... gets to the point where it's loading mstoolbar.aspx (the second script IE ...
      (microsoft.public.windowsxp.help_and_support)
    • Re: system 32 problems
      ... > Windows Script 5.6 - after un-installing Norton AV including most other ... installing Scripten frequently heals the OS after ... > removing Norton, provided you are running XP or 2000. ... >> 16 BIT WINDOWS SUB SYSTEM ...
      (microsoft.public.windowsxp.general)
    • Re: Script Error
      ... Script Debugging Problem ... You might also try installing the Windows Script 5.6 for Windows 2000 and XP ... Internet options>Advanced tab..scroll down to Security and check Allow ...
      (microsoft.public.windows.inetexplorer.ie6.browser)