From 763b201fe479a156e46c0c66995722ba8c061102 Mon Sep 17 00:00:00 2001 From: Brett Meyer Date: Sun, 23 Jun 2013 13:42:53 -0400 Subject: [PATCH] HHH-8331 keep postgres81 as the default --- .../internal/StandardDatabaseInfoDialectResolver.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/engine/jdbc/dialect/internal/StandardDatabaseInfoDialectResolver.java b/hibernate-core/src/main/java/org/hibernate/engine/jdbc/dialect/internal/StandardDatabaseInfoDialectResolver.java index 60bf5c1e02..996fa571fd 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/jdbc/dialect/internal/StandardDatabaseInfoDialectResolver.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/jdbc/dialect/internal/StandardDatabaseInfoDialectResolver.java @@ -93,11 +93,15 @@ public class StandardDatabaseInfoDialectResolver implements DatabaseInfoDialectR final int majorVersion = databaseInfo.getDatabaseMajorVersion(); final int minorVersion = databaseInfo.getDatabaseMinorVersion(); - if ( majorVersion == 8 ) { - return minorVersion >= 2 ? new PostgreSQL82Dialect() : new PostgreSQL81Dialect(); + if ( majorVersion == 9 ) { + return new PostgreSQL9Dialect(); } - return new PostgreSQL9Dialect(); + if ( majorVersion == 8 && minorVersion >= 2 ) { + return new PostgreSQL82Dialect(); + } + + return new PostgreSQL81Dialect(); } if ( "Apache Derby".equals( databaseName ) ) {