Re: [GENERAL] Protocol 2 and query parameters support

Список
Период
Сортировка
От Tatsuo Ishii
Тема Re: [GENERAL] Protocol 2 and query parameters support
Дата
Msg-id 20170425.081146.1187742164733573724.t-ishii@sraoss.co.jp
обсуждение исходный текст
Ответ на Re: [GENERAL] Protocol 2 and query parameters support  (Andres Freund)
Список pgsql-general
Дерево обсуждения
[GENERAL] Protocol 2 and query parameters support  (Konstantin Izmailov, )
 Re: [GENERAL] Protocol 2 and query parameters support  (Adrian Klaver, )
  Re: [GENERAL] Protocol 2 and query parameters support  ("David G. Johnston", )
 Re: [GENERAL] Protocol 2 and query parameters support  (Andres Freund, )
  Re: [GENERAL] Protocol 2 and query parameters support  (Tom Lane, )
   Re: [GENERAL] Protocol 2 and query parameters support  (Tatsuo Ishii, )
    Re: [GENERAL] Protocol 2 and query parameters support  ("Rader, David", )
     Re: [GENERAL] Protocol 2 and query parameters support  (Andres Freund, )
      Re: [GENERAL] Protocol 2 and query parameters support  (Tatsuo Ishii, )
> 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


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

Предыдущее
От: Andres Freund
Дата:
Сообщение: [GENERAL] Questionaire: Common WAL write rates on busy servers.
Следующее
От: Vladimir Borodin
Дата:
Сообщение: Re: [GENERAL] [PERFORM] Questionaire: Common WAL write rates on busy servers.