if ( "PostgreSQL".equals( databaseName ) ) {
final int majorVersion = databaseInfo.getDatabaseMajorVersion();
final int minorVersion = databaseInfo.getDatabaseMinorVersion();
if ( majorVersion == 9 ) {
return new PostgreSQL9Dialect();
}
if ( majorVersion == 8 && minorVersion >= 2 ) {
return new PostgreSQL82Dialect();
}