mirror of
https://github.com/postgres/postgres.git
synced 2025-06-17 17:02:08 +03:00
Remove some useless code
In commit8b08f7d482
I added member relationId to IndexStmt struct. I'm now not sure why; DefineIndex doesn't need it, since the relation OID is passed as a separate argument anyway. Remove it. Also remove a redundant assignment to the relationId argument (it wasn't redundant when added by commite093dcdd28
, but should have been removed in commit5f173040e3
), and use relationId instead of stmt->relation when locking the relation in the second phase of CREATE INDEX CONCURRENTLY, which is not only confusing but it means we resolve the name twice for no reason.
This commit is contained in:
@ -1313,7 +1313,6 @@ generateClonedIndexStmt(RangeVar *heapRel, Oid heapRelid, Relation source_idx,
|
||||
/* Begin building the IndexStmt */
|
||||
index = makeNode(IndexStmt);
|
||||
index->relation = heapRel;
|
||||
index->relationId = heapRelid;
|
||||
index->accessMethod = pstrdup(NameStr(amrec->amname));
|
||||
if (OidIsValid(idxrelrec->reltablespace))
|
||||
index->tableSpace = get_tablespace_name(idxrelrec->reltablespace);
|
||||
|
Reference in New Issue
Block a user