X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id EB739D725B for ; Mon, 21 Nov 2005 00:31:05 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 38732-07 for ; Mon, 21 Nov 2005 04:31:03 +0000 (GMT) X-Greylist: delayed 00:06:36.249367 by SQLgrey- Received: from smtp105.mail.sc5.yahoo.com (smtp105.mail.sc5.yahoo.com [66.163.169.225]) by svr1.postgresql.org (Postfix) with SMTP id ECA1ED9566 for ; Mon, 21 Nov 2005 00:31:02 -0400 (AST) Received: (qmail 28667 invoked from network); 21 Nov 2005 04:24:21 -0000 Received: from unknown (HELO ?127.0.0.1?) (nmceachen@70.56.55.86 with plain) by smtp105.mail.sc5.yahoo.com with SMTP; 21 Nov 2005 04:24:20 -0000 Message-ID: <43814BE7.1090507@mceachen.us> Date: Sun, 20 Nov 2005 21:24:07 -0700 From: Nathan McEachen User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Creating a database using ant Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200511/130 X-Sequence-Number: 14228 Hello, I am trying to write get ant to drop and create a database. I tried to use the sql task but recieved the following error: java.sql.SQLException: ERROR: DROP DATABASE cannot run inside a transaction block Here is my ant task: Although autocommit is false, it looks like the sql script is still executing within a transaction. Does anyone know a workaround? I also tried runing the dropdb command directly, but (from my understanding) ant cannot receive user input during execution. As a result, I can't supply a password to dropdb (at least I don't know how to do it). Many thanks, -Nathan -- In theory, there is no difference between theory and practice. But, in practice, there is. --Jan L.A. van de Snepscheut