in reply to connecting to postgresql with DBI

If blowing up means segfault, its most likely an binary incompatibility with a module; here the database driver? How did you install DBD::Pg?


holli, /regexed monk/

Replies are listed 'Best First'.
Re^2: connecting to postgresql with DBI
by kevind0718 (Scribe) on Mar 20, 2008 at 23:54 UTC
    I used the Perl Package Manager
    It seems to have picked up DBD-Pg 1.45 from cpan.org/dist/DBD-Pg-1.45

    I do not know if this is good, bad or ulgy.

    Hmmm my home machine shows a different driver to be available.
    It shows DBD-PgPP ver .05.

    Which one should I use?

    thanks for your help.

    kd
      DBD-PgPP is a pure perl version...either will work (AFAIK), but the pure perl is bound to be slower. Another alternative is DBD::ODBC with the Pg ODBC driver (in the spirit of "just try different stuff until something works").

      (Update: ) Possibly helpful site seen in the CB:http://pgfoundry.org/frs/?group_id=1000199.

        hello kind and wise monks:

        I am still battling with connecting to POSTGRESQL. I managed to use PPM from the command line to install DBD-Pg-5.8.ppd. As follows:
        C:\progFiles\PERL>ppm install http://pgfoundry.org/frs/download.php/16 +39/DBD-Pg-5.8.ppd Downloading DBD-Pg-2.0...done Unpacking DBD-Pg-2.0...done Generating HTML for DBD-Pg-2.0...done Updating files in site area...done 1 file installed 1 file unchanged 5 files updated C:\progFiles\PERL>cd \

        Now when I run my little test program I get the following:
        C:\HFAccess\devPostgresql>perl -w testDBI.pl install_driver(Pg) failed: Can't load 'c:/progFiles/PERL/site/lib/auto +/DBD/Pg/Pg.dll' for module DBD::Pg: load_file:The specified procedure could not be found at c:/progFiles/PERL/lib/DynaLoader.pm li +ne 230. at (eval 4) line 3 Compilation failed in require at (eval 4) line 3. Perhaps a required shared library or dll isn't installed where expecte +d at testDBI.pl line 16 C:\HFAccess\devPostgresql>

        the file Pg.dll exists the the directory above.
        I also get a dialog box that states: The procedure entry point Perl_newXS_falgs could not be located in the dynamic link library perl58.dll

        what can I say except help!

        thanks
        kd
        thanks for that pointer.
        I will look that over.
        thanks again kind and wise monks.

        Happy and Blessed Easter or whatever you celibrate at this time of year.

        Give peace a chance.

        kd
      Use DBD::Pg. DBD::PgPP has significant problems with placeholder substitution -- if a value contains a ?, that ? is treated as a placeholder, resulting in invalid SQL. There are two open tickets on the in RT for the module, but the module hasn't been updated since 2004.