pgjdbc icon indicating copy to clipboard operation
pgjdbc copied to clipboard

docs: remove protocolVersion

Open bpd0018 opened this issue 7 years ago • 9 comments

The only supported backend/frontend protocol version is V3 since REL42.0.0 (committed Nov 14, 2016, released Feb 18, 2017). Removing it here makes this list consistent with pgjdbc/README.md in regards to protocolVersion.

bpd0018 avatar Feb 18 '18 16:02 bpd0018

Codecov Report

Merging #1128 into master will not change coverage. The diff coverage is n/a.

@@            Coverage Diff            @@
##             master    #1128   +/-   ##
=========================================
  Coverage     67.25%   67.25%           
  Complexity     3673     3673           
=========================================
  Files           170      170           
  Lines         15640    15640           
  Branches       2531     2531           
=========================================
  Hits          10519    10519           
  Misses         3932     3932           
  Partials       1189     1189

codecov-io avatar Feb 18 '18 17:02 codecov-io

There are a number of other instances that should be removed as well https://github.com/pgjdbc/pgjdbc/blob/32c539020db3c940bae9b2a42425b1f23e864c73/build.properties#L21 https://github.com/pgjdbc/pgjdbc/blob/43e6505e3aa16e6acdf08f02f2dd1e3cf131ac3e/pgjdbc/src/main/java/org/postgresql/core/ConnectionFactory.java#L29 https://github.com/pgjdbc/pgjdbc/blob/5c12da16d3aa17d299e942c4a2b3647674422920/pgjdbc/src/test/java/org/postgresql/test/TestUtil.java#L53 https://github.com/pgjdbc/pgjdbc/blob/f6a727a96a437491813a8d940e1dbac287b53131/docs/documentation/faq.md#L153 https://github.com/pgjdbc/pgjdbc/blob/d7f0f271b73adbf0ae22146beea122e014d9f9f2/pgjdbc/src/main/java/org/postgresql/ds/common/BaseDataSource.java#L285 https://github.com/pgjdbc/pgjdbc/blob/e133510e70114db128784911b6790b5690d77320/pgjdbc/src/main/java/org/postgresql/core/Parser.java#L786 https://github.com/pgjdbc/pgjdbc/blob/32c539020db3c940bae9b2a42425b1f23e864c73/pgjdbc/src/main/java/org/postgresql/PGProperty.java#L54 https://github.com/pgjdbc/pgjdbc/blob/8be516d47ece60b7aeba5a9474b5cac1d538a04a/pgjdbc/src/test/java/org/postgresql/test/ssl/SslTest.java#L69

davecramer avatar Feb 20 '18 13:02 davecramer

My thinking was to leave the actual code in place in case the fabled V4 protocol ever happens, but remove the documentation for the parameter so that people don't try to use it.

bpd0018 avatar Feb 22 '18 12:02 bpd0018

I have now updated faq.md as requested. Let me know if you agree about leaving the code as is.

bpd0018 avatar Feb 23 '18 22:02 bpd0018

I've thought about this and if we are going to leave the code in then we should document the fact that it is currently irrelevant and why we are leaving it there.

davecramer avatar Feb 23 '18 22:02 davecramer

I think there are two ways to do that - either just comment the property in PGProperty under the assumption that anyone looking at protocolVersion will find it there or add a comment at each of the locations where protocolVersion shows up. Which is preferable?

bpd0018 avatar Feb 27 '18 13:02 bpd0018

@bpd0018 , there might easily be PGProperty.PROTOCOL_VERSION.set(properties, 3) usages in the wild, so we cannot just remove PROTOCOL_VERSION property.

vlsi avatar Jun 30 '18 16:06 vlsi

That is I would prefer to just document the current state of protocolVersion (== only 3 is supported, etc) and live it as is.

vlsi avatar Jun 30 '18 16:06 vlsi

@vlsi agreed

davecramer avatar Jul 16 '18 10:07 davecramer