### Question:
PostgresDialect extends StandardDialect { @Override public PreparedSql getIdentitySelectSql( String catalogName, String schemaName, String tableName, String columnName, boolean isQuoteRequired, boolean isIdColumnQuoteRequired) { if (tableName == null) { throw new DomaNullPointerException("tableName"); } if (columnName == null) { throw new DomaNullPointerException("columnName"); } String identitySeqFuncExpr = createIdentitySequenceFunctionExpression( catalogName, schemaName, tableName, columnName, isQuoteRequired, isIdColumnQuoteRequired); String rawSql = "select currval(" + identitySeqFuncExpr + ")"; return new PreparedSql( SqlKind.SELECT, rawSql, rawSql, null, Collections.emptyList(), SqlLogType.FORMATTED); } PostgresDialect();  PostgresDialect(JdbcMappingVisitor jdbcMappingVisitor);  PostgresDialect(SqlLogFormattingVisitor sqlLogFormattingVisitor);  PostgresDialect(ExpressionFunctions expressionFunctions);  PostgresDialect(
      JdbcMappingVisitor jdbcMappingVisitor, SqlLogFormattingVisitor sqlLogFormattingVisitor);  PostgresDialect(
      JdbcMappingVisitor jdbcMappingVisitor,
      SqlLogFormattingVisitor sqlLogFormattingVisitor,
      ExpressionFunctions expressionFunctions); @Override String getName(); @Override boolean isUniqueConstraintViolated(SQLException sqlException); @Override PreparedSql getIdentitySelectSql(
      String catalogName,
      String schemaName,
      String tableName,
      String columnName,
      boolean isQuoteRequired,
      boolean isIdColumnQuoteRequired); @Override Sql<?> getIdentityReservationSql(
      String catalogName,
      String schemaName,
      String tableName,
      String columnName,
      boolean isQuoteRequired,
      boolean isIdColumnQuoteRequired,
      int reservationSize); @Override PreparedSql getSequenceNextValSql(String qualifiedSequenceName, long allocationSize); @Override boolean supportsIdentity(); @Override boolean supportsSequence(); @Override boolean supportsIdentityReservation(); @Override boolean supportsSelectForUpdate(SelectForUpdateType type, boolean withTargets); @Override boolean supportsResultSetReturningAsOutParameter(); @Override JdbcType<ResultSet> getResultSetType(); @Override ScriptBlockContext createScriptBlockContext(); @Override CriteriaBuilder getCriteriaBuilder();  }### Answer:
@Test public void testGetIdentitySelectSql_quoteNotRequired_idQuoteNotRequired() { PostgresDialect dialect = new PostgresDialect(); PreparedSql sql = dialect.getIdentitySelectSql("aaa", "bbb", "ccc", "DDD", false, false); assertEquals( "select currval(pg_catalog.pg_get_serial_sequence('aaa.bbb.ccc', 'ddd'))", sql.getRawSql()); }
@Test public void testGetIdentitySelectSql_quoteRequired_idQuoteNotRequired() { PostgresDialect dialect = new PostgresDialect(); PreparedSql sql = dialect.getIdentitySelectSql("aaa", "bbb", "ccc", "DDD", true, false); assertEquals( "select currval(pg_catalog.pg_get_serial_sequence('\"aaa\".\"bbb\".\"ccc\"', 'ddd'))", sql.getRawSql()); }
@Test public void testGetIdentitySelectSql_quoteNotRequired_idQuoteRequired() { PostgresDialect dialect = new PostgresDialect(); PreparedSql sql = dialect.getIdentitySelectSql("aaa", "bbb", "ccc", "DDD", false, true); assertEquals( "select currval(pg_catalog.pg_get_serial_sequence('aaa.bbb.ccc', 'DDD'))", sql.getRawSql()); }
@Test public void testGetIdentitySelectSql_quoteRequired_idQuoteRequired() { PostgresDialect dialect = new PostgresDialect(); PreparedSql sql = dialect.getIdentitySelectSql("aaa", "bbb", "ccc", "DDD", true, true); assertEquals( "select currval(pg_catalog.pg_get_serial_sequence('\"aaa\".\"bbb\".\"ccc\"', 'DDD'))", sql.getRawSql()); }