import java.sql.*; public class ServerPreparedDouble { //create table doubletable (x double precision); public static void main(String args[]) throws Exception { Class.forName("org.postgresql.Driver"); Connection conn = DriverManager.getConnection("jdbc:postgresql://localhost:5432/jurka","jurka",""); PreparedStatement pstmt = conn.prepareStatement("INSERT INTO doubletable (x) VALUES (?) "); ((org.postgresql.jdbc1.AbstractJdbc1Statement)pstmt).setUseServerPrepare(true); pstmt.setDouble(1,2.0); pstmt.executeUpdate(); } }