mirror of
https://github.com/postgres/postgres.git
synced 2026-06-10 17:20:31 -04:00
use the result set to set the fetchsize
This commit is contained in:
parent
f590a5ea72
commit
f4b4d7ce60
1 changed files with 4 additions and 4 deletions
|
|
@ -82,7 +82,7 @@ public class CursorFetchTest extends TestCase
|
|||
PreparedStatement stmt = con.prepareStatement("select * from test_fetch order by value");
|
||||
stmt.setFetchSize(0);
|
||||
ResultSet rs = stmt.executeQuery();
|
||||
stmt.setFetchSize(50); // Should have no effect.
|
||||
rs.setFetchSize(50); // Should have no effect.
|
||||
|
||||
int count = 0;
|
||||
while (rs.next()) {
|
||||
|
|
@ -108,7 +108,7 @@ public class CursorFetchTest extends TestCase
|
|||
PreparedStatement stmt = con.prepareStatement("select * from test_fetch order by value");
|
||||
stmt.setFetchSize(25);
|
||||
ResultSet rs = stmt.executeQuery();
|
||||
stmt.setFetchSize(0);
|
||||
rs.setFetchSize(0);
|
||||
|
||||
int count = 0;
|
||||
while (rs.next()) {
|
||||
|
|
@ -136,7 +136,7 @@ public class CursorFetchTest extends TestCase
|
|||
PreparedStatement stmt = con.prepareStatement("select * from test_fetch order by value");
|
||||
stmt.setFetchSize(25);
|
||||
ResultSet rs = stmt.executeQuery();
|
||||
stmt.setFetchSize(50);
|
||||
rs.setFetchSize(50);
|
||||
|
||||
int count = 0;
|
||||
while (rs.next()) {
|
||||
|
|
@ -164,7 +164,7 @@ public class CursorFetchTest extends TestCase
|
|||
PreparedStatement stmt = con.prepareStatement("select * from test_fetch order by value");
|
||||
stmt.setFetchSize(50);
|
||||
ResultSet rs = stmt.executeQuery();
|
||||
stmt.setFetchSize(25);
|
||||
rs.setFetchSize(25);
|
||||
|
||||
int count = 0;
|
||||
while (rs.next()) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue