From 3eb8a40ba34828ced8c101981bbf745b435c7b7f Mon Sep 17 00:00:00 2001 From: Dave Cramer Date: Thu, 8 Oct 2020 09:03:48 -0400 Subject: [PATCH] Pre release42.2.17 (#1912) * fix: avoid removal type annotations on "this" so the source archive is buildable "this" type annotations are Java 8+, so we no longer need to remove them. * fix: PgTokenizer was ignoring last empty token (#1882) * feat: add smallserial metadata (#899) PostgreSQL 9.2 adds a SMALLSERIAL data type, this reports the correct metadata information when a column is a smallserial (int2 with sequence), similar to how a serial or bigserial data types are reported. * fix:remove osgi from karaf fixes Issue #1891 (#1902) * Change default of gssEncMode to ALLOW. PostgreSQL can deal with PREFER but there are cloud providers that did not implement the protocol properly * update CHANGELOG and posts for 42.2.17 * fix up CHANGELOG * Update README, gssEncMode for release Co-authored-by: Vladimir Sitnikov Co-authored-by: Jorge Solorzano --- CHANGELOG.md | 16 ++++- README.md | 10 +++- docs/_posts/2020-10-02-42.2.17-release.md | 58 +++++++++++++++++++ docs/documentation/head/connect.md | 1 + docs/documentation/head/index.html | 8 +-- .../org/postgresql/util/PGtokenizerTest.java | 17 +----- 6 files changed, 85 insertions(+), 25 deletions(-) create mode 100644 docs/_posts/2020-10-02-42.2.17-release.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c8f644052..a64050292e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,8 +9,19 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). ### Added ### Fixed -- Avoid NullPointerException when receiving PGbox, PGcircle, PGline, PGlseg, PGpath, PGpoint, PGpolygon, and PGmoney. + +## [42.2.17] +### Changed +- Change default of gssEncMode to ALLOW. PostgreSQL can deal with PREFER but there are cloud providers that did not implement the protocol properly. Libpq gets around this by checking for a GSS credential cache before attempting the connection. This is possible in JDK 8 and up, but not JDK6, or JDK7 fixes Issue #1868 [PR #1913](https://github.com/pgjdbc/pgjdbc/pull/1913) + +### Added +- Add smallserial metadata [PR #899(https://github.com/pgjdbc/pgjdbc/pull/899) + +### Fixed +- Avoid NullPointerException when receiving PGbox, PGcircle, PGline, PGlseg, PGpath, PGpoint, PGpolygon, and PGmoney [PR 1873] (https://github.com/pgjdbc/pgjdbc/pull/1873). - The driver returns enum and jsonb arrays elements as String objects (like in 42.2.14 and earlier versions) [PR 1879](https://github.com/pgjdbc/pgjdbc/pull/1879). +- PgTokenizer was ignoring last empty token [PR #1882](https://github.com/pgjdbc/pgjdbc/pull/1882) +- Remove osgi from karaf fixes Issue #1891 [PR #1902](https://github.com/pgjdbc/pgjdbc/pull/1902) ## [42.2.16] (2020-08-20) ### Known issues @@ -407,4 +418,5 @@ thrown to caller to be dealt with so no need to log at this verbosity by pgjdbc [42.2.14]: https://github.com/pgjdbc/pgjdbc/compare/REL42.2.13...REL42.2.14 [42.2.15]: https://github.com/pgjdbc/pgjdbc/compare/REL42.2.14...REL42.2.15 [42.2.16]: https://github.com/pgjdbc/pgjdbc/compare/REL42.2.15...REL42.2.16 -[Unreleased]: https://github.com/pgjdbc/pgjdbc/compare/REL42.2.16...HEAD +[42.2.17]: https://github.com/pgjdbc/pgjdbc/compare/REL42.2.16...REL42.2.17 +[Unreleased]: https://github.com/pgjdbc/pgjdbc/compare/REL42.2.17...HEAD diff --git a/README.md b/README.md index 7644fa9764..42e6ba86ec 100644 --- a/README.md +++ b/README.md @@ -24,17 +24,17 @@ Most people do not need to compile PgJDBC. You can download the precompiled driv ### Maven Central You can search on The Central Repository with GroupId and ArtifactId [![Maven Search](https://img.shields.io/badge/org.postgresql-postgresql-yellow.svg)][mvn-search] for: -[![Java 8](https://img.shields.io/badge/Java_8-42.2.16-blue.svg)][mvn-jre8] +[![Java 8](https://img.shields.io/badge/Java_8-42.2.17-blue.svg)][mvn-jre8] ```xml org.postgresql postgresql - 42.2.16 + 42.2.17 ``` [mvn-search]: http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.postgresql%22%20AND%20a%3A%22postgresql%22 "Search on Maven Central" -[mvn-jre8]: http://search.maven.org/#artifactdetails|org.postgresql|postgresql|42.2.16|bundle +[mvn-jre8]: http://search.maven.org/#artifactdetails|org.postgresql|postgresql|42.3.0|bundle #### Development snapshots Snapshot builds (builds from `master` branch) are also deployed to Maven Central, so you can test current development version (test some bugfix) using: @@ -132,10 +132,14 @@ In addition to the standard connection parameters the driver supports a number o | reWriteBatchedInserts | Boolean | false | Enable optimization to rewrite and collapse compatible INSERT statements that are batched. | | escapeSyntaxCallMode | String | select | Specifies how JDBC escape call syntax is transformed into underlying SQL (CALL/SELECT), for invoking procedures or functions (requires server version >= 11), possible values: select, callIfNoReturn, call | | maxResultBuffer | String | null | Specifies size of result buffer in bytes, which can't be exceeded during reading result set. Can be specified as particular size (i.e. "100", "200M" "2G") or as percent of max heap memory (i.e. "10p", "20pct", "50percent") | +<<<<<<< HEAD | gssEncMode | String | allow | Controls the preference for using GSSAPI encryption for the connection, values are disable, allow, prefer, and require | | adaptiveFetch | Boolean | false | Specifies if number of rows fetched in ResultSet by each fetch iteration should be dynamic. Number of rows will be calculated by dividing maxResultBuffer size into max row size observed so far. Requires declaring maxResultBuffer and defaultRowFetchSize for first iteration. | adaptiveFetchMinimum | Integer | 0 | Specifies minimum number of rows, which can be calculated by adaptiveFetch. Number of rows used by adaptiveFetch cannot go below this value. | adaptiveFetchMaximum | Integer | -1 | Specifies maximum number of rows, which can be calculated by adaptiveFetch. Number of rows used by adaptiveFetch cannot go above this value. Any negative number set as adaptiveFetchMaximum is used by adaptiveFetch as infinity number of rows. +======= +| gssEncMode | String | allow | Controls the preference for using GSSAPI encryption for the connection, values are disable, allow, prefer, and require | +>>>>>>> 926af227... Pre release42.2.17 (#1912) ## Contributing For information on how to contribute to the project see the [Contributing Guidelines](CONTRIBUTING.md) diff --git a/docs/_posts/2020-10-02-42.2.17-release.md b/docs/_posts/2020-10-02-42.2.17-release.md new file mode 100644 index 0000000000..0dee3d8e37 --- /dev/null +++ b/docs/_posts/2020-10-02-42.2.17-release.md @@ -0,0 +1,58 @@ +--- +title: PostgreSQL JDBC Driver 42.2.17 Released +date: 2020-10-02 14:24:57 +0000 +categories: + - new_release +version: 42.2.17 +--- +**Notable changes** + + +### Changed +- Change default of gssEncMode to ALLOW. PostgreSQL can deal with PREFER but there are cloud providers that did not implement the protocol properly. Libpq gets around this by checking for a GSS credential cache before attempting the connection. This is possible in JDK 8 and up, but not JDK6, or JDK7 fixes Issue #1868 [PR #1913](https://github.com/pgjdbc/pgjdbc/pull/1913) + +### Added +- Add smallserial metadata [PR #899(https://github.com/pgjdbc/pgjdbc/pull/899) + +### Fixed +- Avoid NullPointerException when receiving PGbox, PGcircle, PGline, PGlseg, PGpath, PGpoint, PGpolygon, and PGmoney [PR 1873] (https://github.com/pgjdbc/pgjdbc/pull/1873).. +- The driver returns enum and jsonb arrays elements as String objects (like in 42.2.14 and earlier versions) [PR 1879](https://github.com/pgjdbc/pgjdbc/pull/1879). +- PgTokenizer was ignoring last empty token [PR #1882](https://github.com/pgjdbc/pgjdbc/pull/1882) +- Remove osgi from karaf fixes Issue #1891 [PR #1902](https://github.com/pgjdbc/pgjdbc/pull/1902) + + + + +**Commits by author** + +Dave Cramer (5): + +* fix: PgTokenizer was ignoring last empty token [PR 1882](https://github.com/pgjdbc/pgjdbc/pull/1882) [a6e83342](https://github.com/pgjdbc/pgjdbc/commit/a6e833429303acf330b9ff512df55e1c3c158ee2) +* fix checkstyle [PR 1888](https://github.com/pgjdbc/pgjdbc/pull/1888) [70b02c55](https://github.com/pgjdbc/pgjdbc/commit/70b02c55233bec6ea87286b4fb80ac60a0ebd76f) +* fix: handle smallserial correctly fixes [PR 1897](https://github.com/pgjdbc/pgjdbc/pull/1897) (#1899) [d4a4b2d6](https://github.com/pgjdbc/pgjdbc/commit/d4a4b2d643547e89fc349847d8d0c098108270ab) +* fix:remove osgi from karaf fixes Issue [PR 1891](https://github.com/pgjdbc/pgjdbc/pull/1891) (#1902) [0c2858e9](https://github.com/pgjdbc/pgjdbc/commit/0c2858e9cabb1209c2b30cf03c07a30b8051cf4c) +* Change default of gssEncMode to ALLOW. PostgreSQL can deal with PREFER but there are cloud providers that did not implement the protocol properly [14c4173c](https://github.com/pgjdbc/pgjdbc/commit/14c4173ca6719a8dea8539621583d785bbd8f632) + +Jorge Solorzano (1): + +* feat: add smallserial metadata [PR 899](https://github.com/pgjdbc/pgjdbc/pull/899) [05403bd0](https://github.com/pgjdbc/pgjdbc/commit/05403bd02ed40e4f029f19800b32af9f96637e34) + +Vladimir Sitnikov (8): + +* fix: handle nulls when the following clasess are used: PGbox, PGcircle, PGline, PGlseg, PGpath, PGpoint, PGpolygon, and PGmoney [c745f4e5](https://github.com/pgjdbc/pgjdbc/commit/c745f4e549b119b8332ef48bbc8b8525ccba0f21) +* chore: fix compileJava7 and compileJava6 [0308ffca](https://github.com/pgjdbc/pgjdbc/commit/0308ffcafa49271d1dabd001404b955c5e8bbe28) +* chore: run GitHub actions when branch name has slash [433817d6](https://github.com/pgjdbc/pgjdbc/commit/433817d606c42e897ee4b37baf7b50eda5ab3356) +* chore: seed build cache only when credentials exist (==skip on forks) [eec708a8](https://github.com/pgjdbc/pgjdbc/commit/eec708a80ad17f5a17bba5cdbcdcb640b094a965) +* test: add GitHub CI for testing source distribution [44d0923f](https://github.com/pgjdbc/pgjdbc/commit/44d0923fa85e159ac937277767b4dfe2a67df28c) +* test: add tests for enum, json, and jsonb array [1bec4022](https://github.com/pgjdbc/pgjdbc/commit/1bec402208eef17fd81f5dd7cca1d1a36e1466da) +* fix: make enum, json, and jsonb array result classes to be the same as 42.2.14 and earlier [PR 1876](https://github.com/pgjdbc/pgjdbc/pull/1876) [41855018](https://github.com/pgjdbc/pgjdbc/commit/41855018a0371ea6c36d1c88e3a33402f44f53eb) +* fix: avoid removal type annotations on "this" so the source archive is buildable [832bf21c](https://github.com/pgjdbc/pgjdbc/commit/832bf21c3ac37691dc71f6ee6bc1e3da34c7d746) + + +### Contributors to this release + +We thank the following people for their contributions to this release. + +[Dave Cramer](davec@postgresintl.com) +[Jorge Solorzano](https://github.com/jorsol) +[Vladimir Sitnikov](https://github.com/vlsi) diff --git a/docs/documentation/head/connect.md b/docs/documentation/head/connect.md index fefa4ba84e..548c5eb809 100644 --- a/docs/documentation/head/connect.md +++ b/docs/documentation/head/connect.md @@ -387,6 +387,7 @@ Connection conn = DriverManager.getConnection(url); `prefer` will attempt connect in encrypted mode and fall back to plain text if it fails to acquire an encrypted connection `require` attempts to connect in encrypted mode and will fail to connect if that is not possible. + The default is `allow`. * **gsslib** = String diff --git a/docs/documentation/head/index.html b/docs/documentation/head/index.html index 16a4b8233a..3227d6d444 100644 --- a/docs/documentation/head/index.html +++ b/docs/documentation/head/index.html @@ -35,7 +35,7 @@

Table of Contents

1. Introduction
- +
2. Setting up the JDBC Driver
@@ -45,7 +45,7 @@

Table of Contents

Creating a Database
- +
3. Initializing the Driver
@@ -101,7 +101,7 @@

Table of Contents

7. Storing Binary Data
- +
8. JDBC escapes
@@ -253,7 +253,7 @@

List of Examples

Privacy Policy | About PostgreSQL
- Copyright © 1996-2017 The PostgreSQL Global Development Group + Copyright © 1996-2020 The PostgreSQL Global Development Group
diff --git a/pgjdbc/src/test/java/org/postgresql/util/PGtokenizerTest.java b/pgjdbc/src/test/java/org/postgresql/util/PGtokenizerTest.java index c1a1875b37..e84188e1e8 100644 --- a/pgjdbc/src/test/java/org/postgresql/util/PGtokenizerTest.java +++ b/pgjdbc/src/test/java/org/postgresql/util/PGtokenizerTest.java @@ -1,12 +1,11 @@ /* - * Copyright (c) 2017, PostgreSQL Global Development Group + * Copyright (c) 2020, PostgreSQL Global Development Group * See the LICENSE file in the project root for more information. */ package org.postgresql.util; import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertTrue; import org.junit.Assert; import org.junit.jupiter.api.Test; @@ -26,18 +25,4 @@ void removePara() { Assert.assertEquals("1,2EC1830300027,1,,", string); } - @Test - void removeBox() { - assertTrue(true); - } - - @Test - void removeAngle() { - assertTrue(true); - } - - @Test - void removeCurlyBrace() { - assertTrue(true); - } }