PostgisLobTest fails against PostgreSQL 9.4

Description

PostgisLobTest still fails against a fresh PostgreSQL 9.4 test database because gt-jdbc-postgis uses postgresql-8.4-701.jdbc3.jar for tests, and although PostGISDialect faithfully writes bytea hex format for PostgreSQL 9.4, the PostgreSQL 8.4 JDBC driver cannot read bytea hex format and returns corrupted values.

Failed tests:
PostgisLobTest>OnlineTestCase.run:123->JDBCLobTest.testWrite:84 null
PostgisLobTest>OnlineTestCase.run:123->JDBCLobTest.testRead:66 null
PostgisLobTest>OnlineTestCase.run:123->JDBCLobTest.testWrite:84 null
PostgisLobTest>OnlineTestCase.run:123->JDBCLobTest.testRead:66 null

Running the unit test in Eclipse with postgresql-jdbc4-9.2.jar prepended to the classpath makes the test pass. This JDBC driver was from libpostgresql-jdbc-java 9.2-1002-1 on debian/sid. This suggests to me that the problem is the age of the JDBC driver used in the test.

This looks to me like the same failure reported in [https://jira.codehaus.org/browse/GEOT-4040" title="Support PostgreSQL 9 hex bytea output format to avoid massive data corruption" class="issue-link" data-issue-key="GEOT-4040"><del>GEOT-4040</del>. The workaround is the same:

alter database test set bytea_output = 'escape';

Tested with postgresql-9.4 9.4.0-1 amd64 on debian/sid.

Environment

None

Assignee

Unassigned

Reporter

codehaus

Triage

None

Components

Affects versions

Priority

Medium
Configure