pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pg or DBI
6+ messages / 6 participants
[nested] [flat]

* pg or DBI
@ 2002-10-24 17:05 Devinder K Rajput <Devinder.Rajput@ipaper.com>
  2002-10-24 17:10 ` Re: pg or DBI Gareth Kirwan <gbjk@thermeoneurope.com>
  2002-10-24 17:20 ` Re: pg or DBI Jeremy Buchmann <jeremy@wellsgaming.com>
  2002-10-26 11:26 ` Re: pg or DBI Peter Galbavy <peter.galbavy@knowtion.net>
  0 siblings, 3 replies; 6+ messages in thread

From: Devinder K Rajput @ 2002-10-24 17:05 UTC (permalink / raw)
  To: pgsql-novice@postgresql.org; pgsql-admin

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.

Devinder Rajput
Stores Division Corporate Offices
Chicago, IL
(773) 442-6474





^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: pg or DBI
  2002-10-24 17:05 pg or DBI Devinder K Rajput <Devinder.Rajput@ipaper.com>
@ 2002-10-24 17:10 ` Gareth Kirwan <gbjk@thermeoneurope.com>
  2 siblings, 0 replies; 6+ messages in thread

From: Gareth Kirwan @ 2002-10-24 17:10 UTC (permalink / raw)
  To: Devinder K Rajput <Devinder.Rajput@ipaper.com>; pgsql-novice@postgresql.org; pgsql-admin

I looked into it very heavily when I was first deciding on a method.
I chose to use Pg, and I've found it amazing ever since.
I use it religiously, with Mason, and haven't been let down by it once.

I'm sure the reasons I found were enough for me, and should be enough for
anyone :-)

Gareth

-----Original Message-----
From: pgsql-admin-owner@postgresql.org
[mailto:pgsql-admin-owner@postgresql.org]On Behalf Of Devinder K Rajput
Sent: 24 October 2002 18:05
To: pgsql-novice@postgresql.org; pgsql-admin@postgresql.org
Subject: [ADMIN] pg or DBI


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.

Devinder Rajput
Stores Division Corporate Offices
Chicago, IL
(773) 442-6474



---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)





^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: pg or DBI
  2002-10-24 17:05 pg or DBI Devinder K Rajput <Devinder.Rajput@ipaper.com>
@ 2002-10-24 17:20 ` Jeremy Buchmann <jeremy@wellsgaming.com>
  2 siblings, 0 replies; 6+ messages in thread

From: Jeremy Buchmann @ 2002-10-24 17:20 UTC (permalink / raw)
  To: Devinder K Rajput <Devinder.Rajput@ipaper.com>; +Cc: pgsql-novice@postgresql.org; pgsql-admin


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




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: pg or DBI
  2002-10-24 17:05 pg or DBI Devinder K Rajput <Devinder.Rajput@ipaper.com>
@ 2002-10-26 11:26 ` Peter Galbavy <peter.galbavy@knowtion.net>
  2 siblings, 0 replies; 6+ messages in thread

From: Peter Galbavy @ 2002-10-26 11:26 UTC (permalink / raw)
  To: pgsql-novice@postgresql.org; pgsql-admin; Devinder K Rajput <Devinder.Rajput@ipaper.com>

> 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




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: [NOVICE] pg or DBI
@ 2002-10-24 18:17 Williams, Travis L, NPONS <tlw@att.com>
  2002-10-24 20:11 ` Re: [NOVICE] pg or DBI Jason Earl <jason.earl@simplot.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Williams, Travis L, NPONS @ 2002-10-24 18:17 UTC (permalink / raw)
  To: Devinder K Rajput <Devinder.Rajput@ipaper.com>; pgsql-novice@postgresql.org; pgsql-admin

Unless I am mistaken (which actually happens quite often) DBI is the
base modue that perl uses.. the extension of that DBI::Pg (which is
called in the script) is postgres specific.  That is what I am using and
I am new to postgres but have been working with perl for 3-4 years and I
have found it very easy to use.

Travis

-----Original Message-----
From: Devinder K Rajput [mailto:Devinder.Rajput@ipaper.com]
Sent: Thursday, October 24, 2002 12:05 PM
To: pgsql-novice@postgresql.org; pgsql-admin@postgresql.org
Subject: [NOVICE] pg or DBI


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.

Devinder Rajput
Stores Division Corporate Offices
Chicago, IL
(773) 442-6474



---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: [NOVICE] pg or DBI
  2002-10-24 18:17 Re: [NOVICE] pg or DBI Williams, Travis L, NPONS <tlw@att.com>
@ 2002-10-24 20:11 ` Jason Earl <jason.earl@simplot.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Jason Earl @ 2002-10-24 20:11 UTC (permalink / raw)
  To: Williams, Travis L, NPONS <tlw@att.com>; +Cc: Devinder K Rajput <Devinder.Rajput@ipaper.com>; pgsql-novice@postgresql.org; pgsql-admin


Actually there are two PostgreSQL Perl interfaces the DBI based one
and Pg.  It has been a while since I have used Perl (and it has been
even longer since I used the Pg interface), but I can tell you that
most people use the DBI version.  The two interfaces are very similar,
but the Pg interface is PostgreSQL specific.  In other words, if you
want to migrate to another database in the future then you should use
DBI.  DBI is also likely to be more familiar to Perl hackers that have
worked with another database.

Jason

"Williams, Travis L, NPONS" <tlw@att.com> writes:

> Unless I am mistaken (which actually happens quite often) DBI is the
> base modue that perl uses.. the extension of that DBI::Pg (which is
> called in the script) is postgres specific.  That is what I am using and
> I am new to postgres but have been working with perl for 3-4 years and I
> have found it very easy to use.
> 
> Travis
> 
> -----Original Message-----
> From: Devinder K Rajput [mailto:Devinder.Rajput@ipaper.com]
> Sent: Thursday, October 24, 2002 12:05 PM
> To: pgsql-novice@postgresql.org; pgsql-admin@postgresql.org
> Subject: [NOVICE] pg or DBI
> 
> 
> 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.
> 
> Devinder Rajput
> Stores Division Corporate Offices
> Chicago, IL
> (773) 442-6474
> 
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2002-10-26 11:26 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-10-24 17:05 pg or DBI Devinder K Rajput <Devinder.Rajput@ipaper.com>
2002-10-24 17:10 ` Gareth Kirwan <gbjk@thermeoneurope.com>
2002-10-24 17:20 ` Jeremy Buchmann <jeremy@wellsgaming.com>
2002-10-26 11:26 ` Peter Galbavy <peter.galbavy@knowtion.net>
2002-10-24 18:17 Re: [NOVICE] pg or DBI Williams, Travis L, NPONS <tlw@att.com>
2002-10-24 20:11 ` Jason Earl <jason.earl@simplot.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox