Skip to content
This repository was archived by the owner on Sep 7, 2021. It is now read-only.
This repository is currently being migrated. It's locked while the migration is in progress.

Commit 61f1d19

Browse files
yudppplunny
authored andcommitted
Remove unuse get cols code (#1413)
1 parent 76ca740 commit 61f1d19

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

dialect_postgres.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,7 @@ func (db *postgres) IsColumnExist(tableName, colName string) (bool, error) {
952952

953953
func (db *postgres) GetColumns(tableName string) ([]string, map[string]*core.Column, error) {
954954
args := []interface{}{tableName}
955-
s := `SELECT column_name, column_default, is_nullable, data_type, character_maximum_length, numeric_precision, numeric_precision_radix ,
955+
s := `SELECT column_name, column_default, is_nullable, data_type, character_maximum_length,
956956
CASE WHEN p.contype = 'p' THEN true ELSE false END AS primarykey,
957957
CASE WHEN p.contype = 'u' THEN true ELSE false END AS uniquekey
958958
FROM pg_attribute f
@@ -987,14 +987,14 @@ WHERE c.relkind = 'r'::char AND c.relname = $1%s AND f.attnum > 0 ORDER BY f.att
987987
col.Indexes = make(map[string]int)
988988

989989
var colName, isNullable, dataType string
990-
var maxLenStr, colDefault, numPrecision, numRadix *string
990+
var maxLenStr, colDefault *string
991991
var isPK, isUnique bool
992-
err = rows.Scan(&colName, &colDefault, &isNullable, &dataType, &maxLenStr, &numPrecision, &numRadix, &isPK, &isUnique)
992+
err = rows.Scan(&colName, &colDefault, &isNullable, &dataType, &maxLenStr, &isPK, &isUnique)
993993
if err != nil {
994994
return nil, nil, err
995995
}
996996

997-
// fmt.Println(args, colName, isNullable, dataType, maxLenStr, colDefault, numPrecision, numRadix, isPK, isUnique)
997+
// fmt.Println(args, colName, isNullable, dataType, maxLenStr, colDefault, isPK, isUnique)
998998
var maxLen int
999999
if maxLenStr != nil {
10001000
maxLen, err = strconv.Atoi(*maxLenStr)

0 commit comments

Comments
 (0)