Hi folks,
my setup: Java 1.6, JDBC PostgreSQL JDBC4 driver 9.1-903.
Why when I do:
PreparedStatement ps = myConnection.prepareStatement("SELECT a,b,c FROM mytable WHERE category ~ ?");
ps.setString(1, "my/super/category/a(bcdef");
result = ps.executeQuery();
I need to escape rounded bracket in setString in this way:
ps.setString(1, "super/category/a(bcdef".replaceAll("\\(", "\\\\(")));
I think it has somethink to do with regular expessions but ot know much more about it.
--
With kind regards,
Ladislav DANKO