Remove some useless code
Alvaro Herrera <alvherre@alvh.no-ip.org>
Remove some useless code In commit 8b08f7d4820f 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 commit e093dcdd285, but should have been removed in commit 5f173040e3), 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.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/indexcmds.c | modified | +2 −3 |
| src/backend/nodes/copyfuncs.c | modified | +0 −1 |
| src/backend/nodes/equalfuncs.c | modified | +0 −1 |
| src/backend/nodes/outfuncs.c | modified | +0 −1 |
| src/backend/parser/gram.y | modified | +0 −2 |
| src/backend/parser/parse_utilcmd.c | modified | +0 −1 |
| src/include/nodes/parsenodes.h | modified | +0 −1 |