---------------------------------------------------------------- * ExecCloseIndices * * Close the index relations stored in resultRelInfo * ---------------------------------------------------------------- */
| 223 | * ---------------------------------------------------------------- |
| 224 | */ |
| 225 | void |
| 226 | ExecCloseIndices(ResultRelInfo *resultRelInfo) |
| 227 | { |
| 228 | int i; |
| 229 | int numIndices; |
| 230 | RelationPtr indexDescs; |
| 231 | |
| 232 | numIndices = resultRelInfo->ri_NumIndices; |
| 233 | indexDescs = resultRelInfo->ri_IndexRelationDescs; |
| 234 | |
| 235 | for (i = 0; i < numIndices; i++) |
| 236 | { |
| 237 | if (indexDescs[i] == NULL) |
| 238 | continue; /* shouldn't happen? */ |
| 239 | |
| 240 | /* Drop lock acquired by ExecOpenIndices */ |
| 241 | index_close(indexDescs[i], RowExclusiveLock); |
| 242 | } |
| 243 | |
| 244 | /* |
| 245 | * XXX should free indexInfo array here too? Currently we assume that |
| 246 | * such stuff will be cleaned up automatically in FreeExecutorState. |
| 247 | */ |
| 248 | } |
| 249 | |
| 250 | /* ---------------------------------------------------------------- |
| 251 | * ExecInsertIndexTuples |
no test coverage detected