Thread: JDBC Driver Test Suite Drop Table w/ Cascade
The dependency tracking added in 7.3 causes a number of JDBC tests to fail because drop table commands are issued for tables that cannot be dropped with the default restrict settings. Kris Jurka Index: src/interfaces/jdbc/org/postgresql/test/TestUtil.java =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/interfaces/jdbc/org/postgresql/test/TestUtil.java,v retrieving revision 1.1 diff -c -r1.1 TestUtil.java *** src/interfaces/jdbc/org/postgresql/test/TestUtil.java 2002/08/14 20:35:40 1.1 --- src/interfaces/jdbc/org/postgresql/test/TestUtil.java 2002/09/09 18:38:26 *************** *** 109,115 **** Statement stmt = con.createStatement(); try { ! stmt.executeUpdate("DROP TABLE " + table); } catch (SQLException ex) { --- 109,119 ---- Statement stmt = con.createStatement(); try { ! String sql = "DROP TABLE " + table; ! if (((org.postgresql.jdbc1.AbstractJdbc1Connection)con).haveMinimumServerVersion("7.3")) { ! sql += " CASCADE "; ! } ! stmt.executeUpdate(sql); } catch (SQLException ex) {
Patch not applied since it was superceeded by a subsequent patch. --Barry Kris Jurka wrote: > The dependency tracking added in 7.3 causes a number of JDBC tests to > fail because drop table commands are issued for tables that cannot be > dropped with the default restrict settings. > > Kris Jurka > > > ------------------------------------------------------------------------ > > Index: src/interfaces/jdbc/org/postgresql/test/TestUtil.java > =================================================================== > RCS file: /projects/cvsroot/pgsql-server/src/interfaces/jdbc/org/postgresql/test/TestUtil.java,v > retrieving revision 1.1 > diff -c -r1.1 TestUtil.java > *** src/interfaces/jdbc/org/postgresql/test/TestUtil.java 2002/08/14 20:35:40 1.1 > --- src/interfaces/jdbc/org/postgresql/test/TestUtil.java 2002/09/09 18:38:26 > *************** > *** 109,115 **** > Statement stmt = con.createStatement(); > try > { > ! stmt.executeUpdate("DROP TABLE " + table); > } > catch (SQLException ex) > { > --- 109,119 ---- > Statement stmt = con.createStatement(); > try > { > ! String sql = "DROP TABLE " + table; > ! if (((org.postgresql.jdbc1.AbstractJdbc1Connection)con).haveMinimumServerVersion("7.3")) { > ! sql += " CASCADE "; > ! } > ! stmt.executeUpdate(sql); > } > catch (SQLException ex) > { > > > ------------------------------------------------------------------------ > > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org