mirror of
https://gitee.com/dromara/dbswitch.git
synced 2025-09-09 13:39:10 +00:00
[fix]Postgresql字符串字段非主键及有长度的情况下转换为varchar类型
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user