JDBC API to send SimpleQuery ('Q')?
Karthik Segpi <[email protected]> Fri, 25 Apr 2014 11:10:43 -0400
| Newsgroups | gmane.comp.db.postgresql.interfaces |
|---|---|
| Message-ID | <CACD7L9FeKERVub6kDqKTn7C1aYFPSM=nPJycnf+QpwKUGwq4VQ@mail.gmail.com> |
I have the following Java code running in tomcat 7 using
'postgresql-9.3-1101-jdbc41.jar' driver.
String str = "insert into tab1(a,b) values ('name', 'address');"
Statement stmt = conn.createStatement();
stmt.execute(str);
Considering that this is *not* a PreparedStatement, I would have expected
the driver to issue a Simple Query ('Q') instead of an ExtendedQuery ('P').
However, when I print the incoming connection at my middleware (pgpool), I
see the query being received is an ExtendedQuery ('P'). When I execute the
same query in psql, it triggers a Simple Query ('Q') as expected.
What am I missing here? Are there any other settings that I need to tweak?
Thanks