From: | brew(at)theMode(dot)com |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: Perl DBI connection to Postgres |
Date: | 2005-02-22 22:00:16 |
Message-ID: | Pine.BSF.4.58.0502221651450.780@themode.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
On Tue, 22 Feb 2005, SG Edwards wrote:
> I'm tyring to use the Perl::DBI module to connect to a postgreSQL database but
> it doesn't seem to like it?
I'm using this with perl 5.6.1 DBI and postgreSQL 7.2.4. I forget which
DBD.
my $connect_string = 'dbi:Pg:dbname=mode_db;user=mode_user';
$dbh = DBI->connect($connect_string)
or die "Got error $DBI::errstr when connecting to database\n";
This is for a backend cron job, hence it can just die if it fails.
The password isn't needed in my case, I trust localhost users. Basically
you just have to play with it, trying different ways until it works.
brew
==========================================================================
Strange Brew (brew(at)theMode(dot)com)
Check out my Stock Option Covered Call website http://www.callpix.com
and my Musician's Online Database Exchange http://www.TheMode.com
==========================================================================
From | Date | Subject | |
---|---|---|---|
Next Message | brew | 2005-02-22 22:28:10 | Re: execute dynamic strings |
Previous Message | Robert Treat | 2005-02-22 20:37:25 | Re: [NOVICE] Question on TRUNCATE privleges |