From: Jeff Self <jself@nngov.com>
To: pgsql-sql@postgresql.org
Subject: Is there something wrong with Perl's dbi and PostgreSQL?
Date: Mon, 29 Sep 2003 13:51:56 -0400
Message-ID: <1064857916.27970.18.camel@jselfpc> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: jself@nngov.com
Subject: Re: Is there something wrong with Perl's dbi and PostgreSQL?
In-Reply-To: <1064857916.27970.18.camel@jselfpc>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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