pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Giuseppe Sacco <giuseppe@eppesuigoccas.homedns.org>
To: pgsql-jdbc@postgresql.org
Subject: Re: DDL in transactions?
Date: Fri, 01 Apr 2005 09:13:14 +0200
Message-ID: <1112339594.3809.14.camel@localhost> (raw)
In-Reply-To: <Pine.BSO.4.56.0503311102060.12053@leary.csoft.net>
References: <1112254334.3881.8.camel@localhost>
	<Pine.BSO.4.56.0503311102060.12053@leary.csoft.net>

Il giorno gio, 31-03-2005 alle 11:09 -0500, Kris Jurka ha scritto:
[...]
> > 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?

Hi Kris,
you was right: I used two different connections.

BTW, is it possible to disable this behaviour and have DDL statement
immediately executed?

Thanks,
Giuseppe




view thread (6+ messages)  latest in thread

Message-ID: <1112339594.3809.14.camel@localhost>
Permalink:  ../1112339594.3809.14.camel@localhost/
Also on:    postgresql.org/message-id/1112339594.3809.14.camel@localhost

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: giuseppe@eppesuigoccas.homedns.org
  Subject: Re: DDL in transactions?
  In-Reply-To: <1112339594.3809.14.camel@localhost>
  References: <1112254334.3881.8.camel@localhost> <Pine.BSO.4.56.0503311102060.12053@leary.csoft.net> <1112339594.3809.14.camel@localhost>

* 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