Bug 741442

Summary: upgrade bundled Postgres driver from 9.0-JDBC4 to 9.1-JDBC4
Product: [Other] RHQ Project Reporter: Ian Springer <ian.springer>
Component: Core ServerAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED DUPLICATE QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: low    
Version: unspecifiedCC: ccrouch, hrupp
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-06 20:19:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ian Springer 2011-09-26 20:17:45 UTC
In order to ensure we fully support Postgres 9.1, we should upgrade to the 9.1 JDBC driver. Now that we require Java 6, we should also switch to the JDBC4 driver. 

From http://jdbc.postgresql.org/download.html: 

"[9.1-901] is the current version of the driver. Unless you have unusual requirements (running old applications or JVMs), this is the driver you should be using. It supports Postgresql 7.2 or newer and requires a 1.4 or newer JVM. It contains support for SSL and the javax.sql package. It comes in two flavors, JDBC3 and JDBC4. If you are using the 1.6 or 1.7 JVM, then you should use the JDBC4 version."

Comment 1 Ian Springer 2011-09-27 19:20:05 UTC
From Heiko:

With Postgres 9.1 (out of the box) I can not log in and get this error in the console log:

Caused by: org.postgresql.util.PSQLException: ERROR: invalid escape string
  Hinweis: Escape string must be empty or one character.

This comes from the fact that postgres 9.1 by default uses 
"standard conforming strings" - those got introduced in 8.x already,
but were turned off and only warned about.
See http://wiki.postgresql.org/wiki/What%27s_new_in_PostgreSQL_9.1#Backward_compatibility_issues

We can put the following in postgresql.conf and signal Postgres to reload the 
config in order to get it working again:

standard_conforming_strings = off 

I have the impression that to fix this out of the box, we would need
a newer version of hibernate('s postgres dialect). Upgrading to the 9.1
driver does not fix it.

Comment 2 Ian Springer 2011-09-27 19:45:44 UTC
Heiko pointed out we are already using the (v9.0) JDBC4 driver in master.

Comment 3 Heiko W. Rupp 2011-09-28 08:51:30 UTC
Comment #1 is not related to the driver and treated in https://bugzilla.redhat.com/show_bug.cgi?id=741855

Comment 4 Heiko W. Rupp 2011-09-28 08:58:00 UTC
In order to upgrade to the 9.1 driver, we need to upload it to the jboss maven repository.

Comment 7 Heiko W. Rupp 2012-02-06 20:19:27 UTC

*** This bug has been marked as a duplicate of bug 787766 ***