[fix]Postgresql字符串字段非主键及有长度的情况下转换为varchar类型

This commit is contained in:
xiaomizhou
2023-11-30 14:09:37 +08:00
parent b4a27397ea
commit 47c708d894

View File

@@ -209,11 +209,11 @@ public class PostgresMetadataQueryProvider extends AbstractMetadataProvider {
if (null != pks && !pks.isEmpty() && pks.contains(fieldname)) {
retval += "VARCHAR(" + length + ")";
} else {
retval += "TEXT";
retval += "VARCHAR(" + length + ")";
}
}
if (v.isHaveDefault()) {
retval += " DEFAULT " + v.getDefaultValue();
retval += " DEFAULT " + "'" + v.getDefaultValue() + "'";
}
break;
case ColumnMetaData.TYPE_BINARY: