Re: Postgres and Perl: Which DBI module?

From: Arguile <arguile(at)lucentstudios(dot)com>
To: phildobbin(at)pobox(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Postgres and Perl: Which DBI module?
Date: 2002-08-02 23:23:31
Message-ID: 1028330612.366.30.camel@broadswd
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 2002-08-02 at 18:45, phildobbin(at)pobox(dot)com wrote:
> I was only questioning the syntax of setting the environment variable
> generally that the book sets out (pp.25).

Those are very different env variables that are not at all related to
DBD::Pg which does not come with the PostgreSQL distribution.

> I _think_ Pg and DBD::Pg are the same thing, just different ways of
> saying things (i.e. Pg module would be DBD::Pg).

Nope. That's what I was saying. Pg is NOT DBD::Pg. The module that comes
bundled with Postgres is Pg, a very low level wrapper.

> I called it from CPAN after all ;-)

http://search.cpan.org/doc/MERGL/pgsql_perl5-1.9.0/Pg.pm -- CPAN Pg
http://search.cpan.org/doc/JBAKER/DBD-Pg-1.13/dbd-pg.pod -- CPAN DBD::Pg

Very different modules.

(Edmund Mergl originally wrote both, Jeffery Baker recently took over
maintaining DBD::Pg)

> In order to use DBI/DBD with postgres, it's the only way
> to do it as far as I can see (``There's more than one way to do it" anon ;-)
>
> O'Reilly's ``PostgreSQL" and ``Programming the Perl DBI" are both pretty
> vague on this (I have both). I'll also post to dbi-perl and see what
> gives (or what Tim Bunce sez...).

I fully agree. The PostgreSQL book only talks about the bundled module
(Pg) and PL/Perl and both only to mention they exist. 'Programming the
Perl DBI' just includes DBD::Pg's POD in the appendix, the installation
instructions are actually in the README in the archive.

Maybe it's time to add an interactive bit to the modules install (with a
flag to deactivate it). This question crops up often and it makes CPAN
installs hard for many people.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-08-02 23:40:41 Re: b1 OR b2 <-> ( CASE WHEN b1 THE true ELSE b2 END ): performance bottleneck on logical OR
Previous Message Tom Lane 2002-08-02 23:06:59 Re: changing varchar limits