Re: [GENERAL] Perl DBD?

From: Thomas Good <tomg(at)admin(dot)nrnet(dot)org>
To: Nationale HaFaBra-site <info(at)hafabra(dot)nl>
Cc: pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] Perl DBD?
Date: 1999-08-06 12:14:33
Message-ID: Pine.LNX.3.96.990806080615.17657A-100000@admin.nrnet.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 6 Aug 1999, Nationale HaFaBra-site wrote:

> I would like to use a perl-script together with postgresql. Therefore I have
> to use the following line:

Hallo Jeroen,

> use pg;

If you want to use DBD-Pg the first line would be - use DBI;

> I know I have to install a DBD herefore, but where can I get it? I have
> installed DBD-pg-0.92, DBI-1.06 and postgresql-6.4.2.

You don't have to get a database driver (DBD) to use the pg module
that comes with postgres. You can use it immediately upon building
the db (if you built the interfaces along with the backend.)

If you want to use DBD, dial up CPAN and go to `modules by author'.
Look for Edmund Mergl. Personally, I really like his DBD module.
As DBI (necessary for DBD) is much more widely documented than pg -
due to the fact that DBI is the generic part of the equation and DBD
modules are database specific - it might be easier for you.

You could try both. ;-)
There is also ecpg - the ESQL(C) interface.

I use DBI::DBD-Pg almost exclusively these days and have lots of code
(public domain) that I'd be happy to send.

> A second (short) question:
> How can I view the tables in a DB?
> Thanks in advance,

$ psql [dbname]
dbname => \d [enter]
OR
dbname => SELECT * FROM table; [enter]

Let me know, a.u.b., if you'd like some code snippets.

Tot straks,
Tom

> Jeroen Hermans
> Webmaster HaFaBra.nl
> info(at)hafabra(dot)nl
>
> ____________________________________________
>
> De ideale LINK tussen muziek en internet:
>
> De Nationale HaFaBra-pagina, http://www.hafabra.nl
>
> Een must voor iedere muziekliefhebber!
> ____________________________________________
>
>

------- North Richmond Community Mental Health Center -------

Thomas Good MIS Coordinator
Vital Signs: tomg@ { admin | q8 } .nrnet.org
Phone: 718-354-5528
Fax: 718-354-5056

/* Member: Computer Professionals For Social Responsibility */

In response to

  • Perl DBD? at 1999-08-06 10:52:35 from Nationale HaFaBra-site

Browse pgsql-general by date

  From Date Subject
Next Message Ross J. Reedstrom 1999-08-06 14:15:17 Re: [GENERAL] table does not exist
Previous Message Stuart Rison 1999-08-06 12:08:41 Re: [GENERAL] Perl DBD?