tanghc 3 years ago
parent
commit
03bd9ecf8a

+ 4 - 0
changelog.md

@@ -1,5 +1,9 @@
 # changelog
 
+## 1.4.15
+
+- 修复PostgreSQL的numeric字段映射为题
+
 ## 1.4.14
 
 - 修复`不支持“variant”数据类型`错误 [#I3CSLO](https://gitee.com/durcframework/code-gen/issues/I3CSLO)

+ 1 - 0
gen/src/main/java/com/gitee/gen/gen/postgresql/PostgreSqlColumnSelector.java

@@ -24,6 +24,7 @@ public class PostgreSqlColumnSelector extends ColumnSelector {
     private static final String SHOW_COLUMN_SQL = "SELECT  " +
             " pg_attribute.attname AS colname,  " +
             " atttypid::regtype AS type,  " +
+            " numeric_scale as SCALE,  " +
             " col_description ( pg_attribute.attrelid, pg_attribute.attnum ) AS cmt,  " +
             " pg_attribute.attnum = pg_constraint.conkey [ 1 ] AS is_pk,  " +
             "CASE WHEN POSITION ( 'nextval' IN column_default ) > 0 THEN 1 ELSE 0 END AS is_identity  " +