JDBC API to send SimpleQuery ('Q')?

Поиск
Список
Период
Сортировка
От Karthik Segpi
Тема JDBC API to send SimpleQuery ('Q')?
Дата
Msg-id CACD7L9FeKERVub6kDqKTn7C1aYFPSM=nPJycnf+QpwKUGwq4VQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: JDBC API to send SimpleQuery ('Q')?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-interfaces
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

В списке pgsql-interfaces по дате отправления:

Предыдущее
От: למען העתיד
Дата:
Сообщение: הורה טוב יותר
Следующее
От: Tom Lane
Дата:
Сообщение: Re: JDBC API to send SimpleQuery ('Q')?