Re: Patch: Force Primitives

Поиск
Список
Период
Сортировка
От Nicholas White
Тема Re: Patch: Force Primitives
Дата
Msg-id CA+=vxNZYNgYQFAr0GJFWOqJp89dr=WejYuOGm10Ni+tG-yY3Dg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Patch: Force Primitives  (Mikko Tiihonen <mikko.tiihonen@nitorcreations.com>)
Ответы Re: Patch: Force Primitives  (Nicholas White <n.j.white@gmail.com>)
Список pgsql-jdbc
> So another patch for that would be nice.

I've attached a patch that fixes setPrepareThreshold; previously setting the threshold to n would mean the n+1th query would be the first binary one, and setting it to zero meant the binary protocol would never be used. This means the first query of a statement could never use the binary protocol. The patch makes setting the threshold to n mean the nth query is binary, so setting it to 1 would make the first query use the binary protocol. The patch includes some test cases that demonstrate this.

> The discussion got stuck on weather updates with feature flags, adding a minor version number to the protocol or just wait for pg 10 to break the protocol is the correct way to go forward.

That patch is pretty interesting - but maybe you could preserve backwards-compatibility by making a new format type (so 0 is text, 1 is binary and 2 is binary-with-implied-sizes). A new format type would give you more flexibility; you could even use variable-length or run-length encodings, or compression to represent (only large?) arrays.

Thanks -

Nick
Вложения

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

Предыдущее
От: Mikko Tiihonen
Дата:
Сообщение: Re: Patch: Force Primitives
Следующее
От: Kris Jurka
Дата:
Сообщение: Re: patch to avoid a NullPointerException