import java.sql.*; public class LOB { public static void main(String args[]) throws Exception { Class.forName("org.postgresql.Driver"); Connection conn = DriverManager.getConnection("jdbc:postgresql://localhost:5750/jurka?protocolVersion=2&compatible=7.1&loglevel=2","jurka",""); Statement stmt = conn.createStatement(); stmt.execute("CREATE TEMP TABLE curtable (c oid)"); stmt.close(); conn.setAutoCommit(false); PreparedStatement pstmt; pstmt = conn.prepareStatement("INSERT INTO curtable (c) VALUES (?)"); pstmt.setBytes(1, "yahoo".getBytes("UTF-8")); pstmt.executeUpdate(); pstmt.close(); conn.commit(); pstmt = conn.prepareStatement("INSERT INTO curtable (c) VALUES (?)"); pstmt.setBytes(1, "yahoo".getBytes("UTF-8")); pstmt.executeUpdate(); pstmt.close(); conn.commit(); conn.close(); } }