Search Postgresql Archives

Re: Protocol 2 and query parameters support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On 2017-04-24 16:07:01 -0400, Rader, David wrote:
>> As Tom mentioned, it sounds like the issue is that Presto expects to only
>> use simple query, not extended query (no server-side prepared statements).
>> The JDBC driver supports setting the prepare threshold to 0 to disable
>> using server-side prepares.
>> 
>> https://jdbc.postgresql.org/documentation/publicapi/org/postgresql/PGStatement.html#setPrepareThreshold-int-
>> 
>> "If threshold is zero, server-side prepare will not be used."
> 
> Note that you can use the extended protocol without server side
> prepares...

Quite correct. Just setting the prepare threshold to 0 does not
prevent PostgreSQL from using extended queries. So the only way not
using extended queires with JDBC is setting the protocol version to 2.
I wonder why PostgreSQL JDBC does not provide similar API to ODBC...

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux