Skip site navigation (1) Skip section navigation (2)

Re: pg or DBI

From: Jeremy Buchmann <jeremy(at)wellsgaming(dot)com>
To: "Devinder K Rajput" <Devinder(dot)Rajput(at)ipaper(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org, pgsql-admin(at)postgresql(dot)org
Subject: Re: pg or DBI
Date: 2002-10-24 17:20:50
Message-ID: F18BBA96-E774-11D6-B00B-000502E740BA@wellsgaming.com (view raw or flat)
Thread:
Lists: pgsql-adminpgsql-novice
On Thursday, October 24, 2002, at 10:05 AM, Devinder K Rajput wrote:

> Hi all,
>
> I have used pg to connect to postgres.  However, I have seen a lot of
> people use DBI.  Are there any advantages/disadvantages in using one or 
> the
> other for connecting to postgres via perl.  Also, which one is more 
> widely
> used?  Thanks for your input.

In theory, DBI is "cross-database", meaning the code you write to access
one database is the same as, or very similar to, the code you write to
access another.  That's nice because if you switch databases, you don't
have to do a huge code re-write, and you don't have to learn a different
set of function calls for each database you use.  Also, DBI is actively
maintained, and I don't know if Perl-Pg is or not.  There has been some
discussion about ditching Perl-Pg in favor of DBI, but I don't know if 
anything
became of that.

--Jeremy


In response to

  • pg or DBI at 2002-10-24 17:05:03 from Devinder K Rajput

pgsql-novice by date

Next:From: Williams, Travis L, NPONSDate: 2002-10-24 18:17:17
Subject: Re: [NOVICE] pg or DBI
Previous:From: Gareth KirwanDate: 2002-10-24 17:10:39
Subject: Re: pg or DBI

pgsql-admin by date

Next:From: Williams, Travis L, NPONSDate: 2002-10-24 18:17:17
Subject: Re: [NOVICE] pg or DBI
Previous:From: Gareth KirwanDate: 2002-10-24 17:10:39
Subject: Re: pg or DBI

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group