Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 44EFB475843; Sat, 26 Oct 2002 07:27:05 -0400 (EDT) Received: from mailstore-1.mail.knowledge.com (frida.london.knowtion.net [213.170.2.69]) by postgresql.org (Postfix) with ESMTP id 6496F4753A1; Sat, 26 Oct 2002 07:27:03 -0400 (EDT) Received: from adsl-solo-40-176.claranet.co.uk ([213.253.40.176] helo=petergalbavy) by mailstore-1.mail.knowledge.com with asmtp (Exim 3.33 #1) id 185P5n-000098-00; Sat, 26 Oct 2002 12:26:59 +0100 Message-ID: <008b01c27ce2$996436d0$10bc10ac@cblan.mblox.com> From: "Peter Galbavy" To: , , "Devinder K Rajput" References: Subject: Re: pg or DBI Date: Sat, 26 Oct 2002 12:26:58 +0100 Organization: Knowtion Ltd. MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2720.3000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200210/260 X-Sequence-Number: 6118 > 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. I have never used Pg but I had a quick look and appears to be the way to go if you are going to be using PostgreSQL only. DBI gives you two benefits which are related; a) You can build software that will work with different database backends with only minimal changes (if you follow the portability guidelines) and b) you can work with multiple different database backends in the same code at the same time. The later is extremely powerful when you 'inherit' a job that may involve ODBC, Oracle, PostgreSQL etc. Cough. Give both a quick try, proof of concept them, and decide. Peter