import java.sql.*; public class DollarTest { public static void main(String args[]) throws Exception { Class.forName("org.postgresql.Driver"); Connection conn = DriverManager.getConnection("jdbc:postgresql://localhost:5830/jurka?loglevel=2","jurka",""); test1(conn); test2(conn); conn.close(); } private static void test1(Connection conn) throws SQLException { conn.createStatement().execute("CREATE TEMP TABLE a$b$c(a varchar, b varchar) "); PreparedStatement pstmt = conn.prepareStatement("INSERT INTO a$b$c (a, b) VALUES (?, ?) "); pstmt.setString(1, "a"); pstmt.setString(2, "b"); pstmt.executeUpdate(); pstmt.close(); } private static void test2(Connection conn) throws SQLException { conn.createStatement().execute("CREATE TEMP TABLE e$f$g(h varchar, e$f$g varchar) "); PreparedStatement pstmt = conn.prepareStatement("UPDATE e$f$g SET h = ? || e$f$g"); pstmt.setString(1, "a"); pstmt.executeUpdate(); pstmt.close(); } }