Is there something wrong with Perl's dbi and PostgreSQL?

From: Jeff Self <jself(at)nngov(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Is there something wrong with Perl's dbi and PostgreSQL?
Date: 2003-09-29 17:51:56
Message-ID: 1064857916.27970.18.camel@jselfpc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I just tried running a perl script that I wrote about a year ago. It had
worked for me in the past. Now it doesn't work. I can view data from a
table, but I am unable to either drop a table or create a table. I'm
running PostgreSQL 7.3.4 and DBI 1.35 along with Perl 5.8.1.

Here's my script for creating a table:
#!/usr/bin/perl -w
# createfoo.pl

use strict;
use DBI;

my $dbh = DBI->connect( 'dbi:Pg:dbname=test','dbuser','password',
{
RaiseError => 1,
AutoCommit => 0
}
) || die "Database connection not made:
$DBI::errstr";

my $query = $dbh->prepare(
"CREATE TABLE foo (foo_id INT4," .
"foo_name TEXT)"
);
$query->execute();
$dbh->disconnect();

Has anything changed to DBI? I haven't found anything on google
suggesting that it has.

--
Jeff Self
Dept. of Information Technology
City of Newport News
(757)926-3741

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Bruce Momjian 2003-09-29 17:54:48 Re: does postgresql execute unions in parallel?
Previous Message Josh Berkus 2003-09-29 17:40:55 Re: [SQL] Conditional row grained + FK dependency oriented lazy replication