X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E9E49537A6 for ; Thu, 31 Mar 2005 18:24:12 +0100 (BST) 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 00291-08 for ; Thu, 31 Mar 2005 17:24:07 +0000 (GMT) Received: from vsmtp12.tin.it (vsmtp12.tin.it [212.216.176.206]) by svr1.postgresql.org (Postfix) with ESMTP id 0932653758 for ; Thu, 31 Mar 2005 18:24:06 +0100 (BST) Received: from casa (80.180.159.66) by vsmtp12.tin.it (7.0.027) (authenticated as giuseppe.sacco17@tin.it) id 422481CF00CC394E for pgsql-jdbc@postgresql.org; Thu, 31 Mar 2005 19:24:03 +0200 Received: from localhost ([127.0.0.1]) by casa with esmtpa (Exim 4.50) id 1DH3Ol-0008WK-Lk for pgsql-jdbc@postgresql.org; Thu, 31 Mar 2005 19:24:03 +0200 Message-ID: <424C3233.9070109@eppesuigoccas.homedns.org> Date: Thu, 31 Mar 2005 19:24:03 +0200 From: Giuseppe Sacco User-Agent: Debian Thunderbird 1.0 (X11/20050116) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "pgsql-jdbc@postgresql.org" Subject: Re: DDL in transactions? References: <1112254334.3881.8.camel@localhost> In-Reply-To: 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, hits=0.672 tagged_above=0 required=5 tests=AWL, TO_ADDRESS_EQ_REAL X-Spam-Level: X-Archive-Number: 200503/214 X-Sequence-Number: 12606 Kris Jurka wrote: [...] >>My question is: why? Shouldn't DDL be executed immediately? > > > No. DDL in postgresql is fully transactable and may be rolled back or > committed. That doesn't explain why the above code doesn't work. > Because the two executeUpdates are on the same Statement on the same > Connection the second execution should see the newly created table because > it is in the same transaction. Perhaps you are not showing us the real > code you are using and you actually have two connections? Thanks Kris, I am going to check it.