Hi,
I have a question about 7.4 jdbc driver. I am executing this code:
--------------------
conn=datasource.getPooledConnection().getConnection();
conn.setAutoCommit(false);
stmt=conn.createStatement();
stmt.executeUpdate("CREATE TABLE X (X VARCHAR(100))");
//stmt.commit(); // <= Look at this line
stmt.executeUpdate("INSERT INTO X VALUES ('string')");
stmt.commit();
stmt.close();
conn.close();
--------------------
And I found that, using postgresql jdbc driver, I need to add the
commit() call that is commented out, otherwise I get an error like
'relation X does not exists'.
My question is: why? Shouldn't DDL be executed immediately?
Thank you for your response,
Giuseppe Sacco