Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: use udt_name for postgres column type if data_type is ARRAY (#1422)

Danny Xu20bec34ed9f7
diff --git a/plugin/db/pg/pg.go b/plugin/db/pg/pg.go
index 073ef4d72d..eb4a08a119 100644
--- a/plugin/db/pg/pg.go
+++ b/plugin/db/pg/pg.go
@@ -1499,8 +1499,11 @@ func getTableColumns(txn *sql.Tx, schemaName, tableName string) ([]*columnSchema
collationName: collationName.String,
comment: comment.String,
}
- if dataType == "USER-DEFINED" {
+ switch dataType {
+ case "USER-DEFINED":
c.dataType = fmt.Sprintf("%s.%s", udtSchema.String, udtName.String)
+ case "ARRAY":
+ c.dataType = udtName.String
}
columns = append(columns, &c)
}