提交 24c494c5 编写于 作者: S Serge Rider 提交者: GitHub

Merge pull request #9788 from dbeaver/postgretimecolumn#4236

#4236 adding parameters to time/timestamp format in DDL

Former-commit-id: ec58a457
......@@ -84,6 +84,8 @@ public class PostgreConstants {
public static final String TYPE_GEOMETRY = "geometry";
public static final String TYPE_GEOGRAPHY = "geography";
public static final String TYPE_INTERVAL = "interval";
public static final String TYPE_TIME = "time";
public static final String TYPE_TIMESTAMP = "timestamp";
public static final String HANDLER_SSL = "postgre_ssl";
......
......@@ -98,6 +98,14 @@ public class PostgreTableColumnManager extends SQLTableColumnManager<PostgreTabl
}
}
break;
case DATETIME:
final int scale = CommonUtils.toInt(column.getScale());
String typeName = dataType.getName();
if (typeName.startsWith(PostgreConstants.TYPE_TIMESTAMP) || typeName.equals(PostgreConstants.TYPE_TIME)) {
if (scale < 6) {
sql.append('(').append(scale).append(')');
}
}
}
if (PostgreUtils.isGISDataType(column.getTypeName())) {
try {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册