Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 04EDB476A38; Thu, 24 Oct 2002 13:21:02 -0400 (EDT) Received: from pop1.greatbasin.net (pop1.greatbasin.net [207.228.35.3]) by postgresql.org (Postfix) with ESMTP id DBDE0476A2D; Thu, 24 Oct 2002 13:21:00 -0400 (EDT) Received: from localhost (rno-dsl0b-131.gbis.net [216.82.145.131]) by pop1.greatbasin.net (8.12.1/8.12.1) with ESMTP id g9OHKurR026011; Thu, 24 Oct 2002 10:20:56 -0700 Date: Thu, 24 Oct 2002 10:20:50 -0700 Subject: Re: pg or DBI Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v482) Cc: pgsql-novice@postgresql.org, pgsql-admin@postgresql.org To: "Devinder K Rajput" From: Jeremy Buchmann In-Reply-To: Message-Id: Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.482) X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200210/230 X-Sequence-Number: 6088 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