-
Notifications
You must be signed in to change notification settings - Fork 110
Inconsistency between rs.getType() and stmt.getResultSetType() #595
Copy link
Copy link
Open
Description
In the provided test case, a Statement object is created with specific ResultSet type parameters, and a query is executed to obtain a ResultSet. However, the type of the ResultSet as reported by rs.getType() does not match the type specified in the Statement object and returned by stmt.getResultSetType().
@Test
public void test() throws SQLException {
Connection con;
Statement stmt;
ResultSet rs;
con = DriverManager.getConnection("jdbc:pgsql://localhost:5432/test11?user=user&password=password");
stmt = con.createStatement(1005, 1007, 2);
stmt.execute("CREATE TABLE table11_0(id VARCHAR(5) PRIMARY KEY,value BIT);");
rs = stmt.executeQuery("SELECT * FROM table11_0;");
System.out.println(rs.getType());
System.out.println(stmt.getResultSetType());
rs.close();
stmt.close();
con.close();
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels