//Oid It's a special index. You can't put it in

This commit is contained in:
4color 2022-01-20 16:50:57 +08:00
parent 0cf694e222
commit ba8fd68735
1 changed files with 13 additions and 0 deletions

View File

@ -1300,6 +1300,19 @@ func (db *postgres) GetIndexes(queryer core.Queryer, ctx context.Context, tableN
indexType = schemas.IndexType
}
colNames = getIndexColName(indexdef)
isSkip := false
//Oid It's a special index. You can't put it in
for _, element := range colNames {
if "oid" == element {
isSkip = true
break
}
}
if isSkip {
continue
}
var isRegular bool
if strings.HasPrefix(indexName, "IDX_"+tableName) || strings.HasPrefix(indexName, "UQE_"+tableName) {
newIdxName := indexName[5+len(tableName):]