Skip to content

Commit

Permalink
[hibernate#1641] added postgres datatype codes for array types
Browse files Browse the repository at this point in the history
  • Loading branch information
blafond committed Feb 5, 2024
1 parent 9019164 commit e88997d
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ protected <T> T processImportedKeysResultSet(

@Override
protected int dataTypeCode(String typeName) {
// Copied from PostgreSQLDialect.
// Copied from PostgreSQLDialect.resolveSqlTypeCode
// Not ideal, but it should work for now
// It would be nice to be able to get the correct code some way
switch ( typeName ) {
Expand All @@ -162,6 +162,11 @@ protected int dataTypeCode(String typeName) {
return SqlTypes.TIMESTAMP_UTC;
case "bytea":
return Types.VARBINARY;
case "_numeric":
case "_bool":
case "_int8":
case "_varchar":
return Types.ARRAY;
default:
return 0;
}
Expand Down

0 comments on commit e88997d

Please sign in to comment.