X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id A0F2BD1B549 for ; Mon, 29 Sep 2003 17:53:55 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 35293-09 for ; Mon, 29 Sep 2003 14:53:25 -0300 (ADT) Received: from visi.net (arsenal.visi.net [206.246.194.60]) by svr1.postgresql.org (Postfix) with ESMTP id 30CDFD1B55C for ; Mon, 29 Sep 2003 14:53:23 -0300 (ADT) Received: from [216.54.20.242] (HELO allhosts) by visi.net (CommuniGate Pro SMTP 4.1.1) with ESMTP id 133985832 for pgsql-sql@postgresql.org; Mon, 29 Sep 2003 13:49:53 -0400 Subject: Is there something wrong with Perl's dbi and PostgreSQL? From: Jeff Self To: pgsql-sql@postgresql.org Content-Type: text/plain Organization: City of Newport News Message-Id: <1064857916.27970.18.camel@jselfpc> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Mon, 29 Sep 2003 13:51:56 -0400 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/403 X-Sequence-Number: 15381 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