Received: from ralf.serv.net (ralf.serv.net [205.153.153.77]) by hub.org (8.8.8/8.7.5) with ESMTP id DAA08966 for ; Sun, 21 Jun 1998 03:36:44 -0400 (EDT) Received: (from mcglk@localhost) by ralf.serv.net (8.8.5/8.8.5) id AAA20815; Sun, 21 Jun 1998 00:37:34 -0700 (PDT) Date: Sun, 21 Jun 1998 00:37:34 -0700 (PDT) Message-Id: <199806210737.AAA20815@ralf.serv.net> From: Ken McGlothlen MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: pgsql-interfaces@hub.org Subject: Take two: Simple CREATE TABLE in DBI::Pg? References: <199806171934.MAA06041@ralf.serv.net> X-Mailer: VM 6.33 under Emacs 19.34.1 [This is the second time I've asked this on this list. Is anyone else getting my messages? I would *really* like to get an answer here.] Here's the program, in Perl; I've pared it down to the bare minimum: #!/usr/local/bin/perl use DBI; sub tbl_easy_init { local( $dbh ) = shift; local( $sth ) = $dbh->prepare( "create table tbl_easy (id int4)" ); $sth->execute(); } $dbh = DBI->connect( "dbi:Pg:dbname=booga", "", "", { "PrintError" => 0, "AutoCommit" => 0 } ); $rv = &tbl_easy_init( $dbh ); This program fails. I've tried it with all global variables, tried a number of different CREATE TABLE statements, and so on, and $rv always winds up being equal to -1. Yet, typing in the CREATE TABLE statement in psql works. If the table is already created in psql, I can use all manner of select statements in the above program skeleton, and it'll work. So. What am I doing wrong? ---Ken