Cannot Retrieve Binary Data
От | patrick |
---|---|
Тема | Cannot Retrieve Binary Data |
Дата | |
Msg-id | 5bd6ef364cb5f644245035172a720b30@freeshell.org обсуждение исходный текст |
Список | pgsql-jdbc |
Hi all , i'm following the example at http://www.postgresql.org/docs/7.4/interactive/jdbc-binary-data.html trying to retrieve previous stored file (more than 600MB) using the following code: Jdbc3ConnectionPool source = new Jdbc3ConnectionPool(); conn = DriverManager.getConnection("jdbc:postgresql://localhost/backup", "test", "test"); conn.setAutoCommit(false); PreparedStatement ps = conn.prepareStatement("SELECT img FROM images WHERE imgname = ?"); ps.setString(1, "civil.dmg"); ResultSet rs = ps.executeQuery(); if (rs != null) { while (rs.next()) { byte[] imgBytes = rs.getBytes(1); // use the data in some way here } rs.close(); } ps.close(); conn.commit(); during the executeQuery() i got a the following exception java.sql.SQLException: ERROR: invalid memory alloc request size 2017394403 The Postgres version is 8.0.1 (compiled from source with default settings ) running on Darwin Kernel Version 7.8.0 Thanks in advance for any help -patrick
В списке pgsql-jdbc по дате отправления: