import java.sql.*;

public class Testme {
    public static void main(String[] args) throws Exception {
		Class.forName("org.postgresql.Driver");
		Connection conn = DriverManager.getConnection("jdbc:postgresql://localhost:5432/foo?user=foo&password=bar&sslmode=disable");
		conn.setAutoCommit(false);
		runtest(conn);
		conn.close();
    }

    public static void runtest(Connection conn) throws Exception {
		Statement stmt = conn.createStatement();
		stmt.setFetchSize(10);
		ResultSet rs = stmt.executeQuery("select oid, relfilenode, relname from pg_class");
		int count = 100;
		while (rs.next() && count-- > 0) {
			System.out.print(".");
		}
		rs.close();
		stmt.close();
		conn.commit();
		System.out.println("");
    }
}
