---
title:  "PostgreSQL JDBC Driver 42.1.0 Released"
date:   2017-05-04 00:00:00 +0300
categories:
  - new_release
version: 42.1.0
---
**Notable changes**

### Added
- Support fetching a REF_CURSOR using getObject [PR 809](https://github.com/pgjdbc/pgjdbc/pull/809)

### Fixed
- Fix data being truncated in setCharacterStream (bug introduced in 42.0.0) [PR 802](https://github.com/pgjdbc/pgjdbc/pull/802)
- Fix calculation of lastReceiveLSN for logical replication [PR 801](https://github.com/pgjdbc/pgjdbc/pull/801)
- Make sure org.postgresql.Driver is loaded when accessing though DataSource interface [Issue 768](https://github.com/pgjdbc/pgjdbc/issues/768)

### Regressions
- There's no 42.1.0.jre6 version due to infinity handling bug. Fixed in 42.1.1.jre6

<!--more-->

**Commits by author**

Alexander Kjäll (1):

* documentation typo [PR 818](https://github.com/pgjdbc/pgjdbc/pull/818) [90f5556f](https://github.com/pgjdbc/pgjdbc/commit/90f5556fd3de2395971496fc4b0b4cacd5d5d562)

Daniel Migowski (1):

* feat: improve waiting for notifications by providing a timeout option [PR 778](https://github.com/pgjdbc/pgjdbc/pull/778) [a7e0c83b](https://github.com/pgjdbc/pgjdbc/commit/a7e0c83be93600c6299ae99907942e2530cb5e30)

Dave Cramer (4):

* Update index.html [4d8b1b38](https://github.com/pgjdbc/pgjdbc/commit/4d8b1b381d8e2ae4ca19c2d84a195412bfc472ee)
* Review the documentation for the replication API [PR 756](https://github.com/pgjdbc/pgjdbc/pull/756) [3e1eb34d](https://github.com/pgjdbc/pgjdbc/commit/3e1eb34d2500eae9fdf4938ebbced4cff886edef)
* fix callproc escape documentation the specification [PR 785](https://github.com/pgjdbc/pgjdbc/pull/785) [95a3f41d](https://github.com/pgjdbc/pgjdbc/commit/95a3f41d6c0debbc6658312c484c6709e3da2225)
* Honour setLogStream. If the logStream is set [PR 780](https://github.com/pgjdbc/pgjdbc/pull/780) [b97ad630](https://github.com/pgjdbc/pgjdbc/commit/b97ad63089a9042cfef0ce97d1eaacce0fe47d4e)

Jacques Fuentes (1):

* Make replication docs use PREFER\_QUERY\_MODE [PR 761](https://github.com/pgjdbc/pgjdbc/pull/761) [bd0497de](https://github.com/pgjdbc/pgjdbc/commit/bd0497dee741e92de1cc3eeabb58a82608ed6070)

James (1):

* fix: use SQLWarning(String reason) constructor for correct DriverManager [PR 751](https://github.com/pgjdbc/pgjdbc/pull/751) [74a426b9](https://github.com/pgjdbc/pgjdbc/commit/74a426b929f47a3f585dd6e535300d2ffe77a9da)

Joe Kutner (1):

* fix: Only resolve hostname if not using a SOCKS proxy [PR 774](https://github.com/pgjdbc/pgjdbc/pull/774) [480b0cf1](https://github.com/pgjdbc/pgjdbc/commit/480b0cf1ffe266e41e259f1f7a016d3ea681cc3a)

Jorge Solorzano (3):

* fix: build site with jekyll 2.2.0 [PR 755](https://github.com/pgjdbc/pgjdbc/pull/755) [773ee679](https://github.com/pgjdbc/pgjdbc/commit/773ee679ae61ae48fed56c915bf4e19576cbb292)
* test: check that new properties follow correct lower camel case [PR 740](https://github.com/pgjdbc/pgjdbc/pull/740) [3f2a02e1](https://github.com/pgjdbc/pgjdbc/commit/3f2a02e128367df6ae47b6f850203200cef223fe)
* refactor: simplify Encoding class [PR 765](https://github.com/pgjdbc/pgjdbc/pull/765) [ef8c6f96](https://github.com/pgjdbc/pgjdbc/commit/ef8c6f9651f54a220f7231a2bc5b8ad0ca08d0c7)

Philippe Marschall (1):

* feat: support fetching a REF_CURSOR using getObject [PR 809](https://github.com/pgjdbc/pgjdbc/pull/809) [4ab5ccb7](https://github.com/pgjdbc/pgjdbc/commit/4ab5ccb7a299cfcec8a5b1cddf612d3f828fa157)

Robert Zenz (1):

* fix: function calls without parameters do not require parentheses [2958cc22](https://github.com/pgjdbc/pgjdbc/commit/2958cc22a6a00609bfbb6eb17d4e401dfe433123)

Vladimir Gordiychuk (2):

* chore: fix false alarm on check coredump [PR 806](https://github.com/pgjdbc/pgjdbc/pull/806) [3883a846](https://github.com/pgjdbc/pgjdbc/commit/3883a846febfe92582be2785737da9460ece1176)
* bug: fix calculation of lastReceiveLSN for logical replication [PR 801](https://github.com/pgjdbc/pgjdbc/pull/801) [170d9c27](https://github.com/pgjdbc/pgjdbc/commit/170d9c27810349456e56aff1c36a0ad6584b9e28)

Vladimir Sitnikov (3):

* fix: make sure org.postgresql.Driver is loaded when accessing though DataSource interface [PR 768](https://github.com/pgjdbc/pgjdbc/pull/768) [9c80adc2](https://github.com/pgjdbc/pgjdbc/commit/9c80adc24776ae02e0aff419e1cddf26a28eeff0)
* refactor: add encoding, fix expected/actual, use proper constructor [77cace40](https://github.com/pgjdbc/pgjdbc/commit/77cace40a4ce33fadafcb5f144b5238bff2854a3)
* fix: infinity handling for java.time types [PR 789](https://github.com/pgjdbc/pgjdbc/pull/789) [f375701b](https://github.com/pgjdbc/pgjdbc/commit/f375701b571c308b7e389df49c1d958f416e4340)

slmsbrhgn (1):

* bug: fix data being truncated in setCharacterStream (the bug introduced in 42.0.0) [PR 802](https://github.com/pgjdbc/pgjdbc/pull/802) [28c98418](https://github.com/pgjdbc/pgjdbc/commit/28c98418b576394b7a0a4a6415ae86ba47be40ae)

<a name="contributors_{{ page.version }}"></a>
### Contributors to this release

We thank the following people for their contributions to this release.

[Alexander Kjäll](https://github.com/alexanderkjall)  
[Daniel Migowski](https://github.com/dmigowski)  
[Dave Cramer](davec@postgresintl.com)  
[Jacques Fuentes](https://github.com/jpfuentes2)  
[James](https://github.com/jamesthomp)  
[Joe Kutner](https://github.com/jkutner)  
[Jorge Solorzano](https://github.com/jorsol)  
[Philippe Marschall](https://github.com/marschall)  
[Robert Zenz](https://github.com/RobertZenz)  
[Vladimir Gordiychuk](https://github.com/Gordiychuk)  
[Vladimir Sitnikov](https://github.com/vlsi)  
[slmsbrhgn](https://github.com/slmsbrhgn)  
