diff options
Diffstat (limited to 'src/backend/commands/tablecmds.c')
-rw-r--r-- | src/backend/commands/tablecmds.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index b2993b80fbc..f5d5b6302f6 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -5705,6 +5705,9 @@ ATExecAddIndex(AlteredTableInfo *tab, Relation rel, Assert(IsA(stmt, IndexStmt)); Assert(!stmt->concurrent); + /* The IndexStmt has already been through transformIndexStmt */ + Assert(stmt->transformed); + /* suppress schema rights check when rebuilding existing index */ check_rights = !is_rebuild; /* skip index build if phase 3 will do it or we're reusing an old one */ @@ -5712,8 +5715,6 @@ ATExecAddIndex(AlteredTableInfo *tab, Relation rel, /* suppress notices when rebuilding existing index */ quiet = is_rebuild; - /* The IndexStmt has already been through transformIndexStmt */ - new_index = DefineIndex(RelationGetRelid(rel), stmt, InvalidOid, /* no predefined OID */ |