Only cast LONG32 to text on PG to avoid type comparison related issues
This commit is contained in:
parent
fc58d614d6
commit
e93a07b4f9
|
@ -199,7 +199,7 @@ public class PostgreSQLLegacyDialect extends Dialect {
|
|||
// "long" string types
|
||||
case LONG32VARCHAR:
|
||||
case LONG32NVARCHAR:
|
||||
return "text";
|
||||
return "varchar";
|
||||
case BLOB:
|
||||
case CLOB:
|
||||
case NCLOB:
|
||||
|
@ -234,7 +234,7 @@ public class PostgreSQLLegacyDialect extends Dialect {
|
|||
case NVARCHAR:
|
||||
case LONG32VARCHAR:
|
||||
case LONG32NVARCHAR:
|
||||
return "text";
|
||||
return "varchar";
|
||||
case BINARY:
|
||||
case VARBINARY:
|
||||
case LONG32VARBINARY:
|
||||
|
|
|
@ -220,7 +220,7 @@ public class PostgreSQLDialect extends Dialect {
|
|||
// since there's no real difference between TEXT and VARCHAR,
|
||||
// except for the length limit, we can just use 'text' for the
|
||||
// "long" string types
|
||||
case LONG32VARCHAR, LONG32NVARCHAR -> "text";
|
||||
case LONG32VARCHAR, LONG32NVARCHAR -> "varchar";
|
||||
|
||||
// use oid as the blob/clob type on Postgres because
|
||||
// the JDBC driver doesn't allow using bytea/text via
|
||||
|
@ -246,7 +246,7 @@ public class PostgreSQLDialect extends Dialect {
|
|||
@Override
|
||||
protected String castType(int sqlTypeCode) {
|
||||
return switch (sqlTypeCode) {
|
||||
case CHAR, NCHAR, VARCHAR, NVARCHAR, LONG32VARCHAR, LONG32NVARCHAR -> "text";
|
||||
case CHAR, NCHAR, VARCHAR, NVARCHAR, LONG32VARCHAR, LONG32NVARCHAR -> "varchar";
|
||||
case BINARY, VARBINARY, LONG32VARBINARY -> "bytea";
|
||||
default -> super.castType( sqlTypeCode );
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue