Get rid of IndexIsUniqueNoCache() kluge by the simple expedient of
Tom Lane <tgl@sss.pgh.pa.us>
Get rid of IndexIsUniqueNoCache() kluge by the simple expedient of passing the index-is-unique flag to index build routines (duh! ... why wasn't it done this way to begin with?). Aside from eliminating an eyesore, this should save a few milliseconds in btree index creation because a full scan of pg_index is not needed any more.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/gist/gist.c | modified | +5 −6 |
| src/backend/access/hash/hash.c | modified | +5 −6 |
| src/backend/access/nbtree/nbtree.c | modified | +7 −12 |
| src/backend/access/rtree/rtree.c | modified | +5 −6 |
| src/backend/bootstrap/bootstrap.c | modified | +11 −25 |
| src/backend/catalog/heap.c | modified | +4 −2 |
| src/backend/catalog/index.c | modified | +27 −71 |
| src/backend/commands/cluster.c | modified | +1 −2 |
| src/backend/commands/indexcmds.c | modified | +7 −7 |
| src/backend/storage/large_object/inv_api.c | modified | +2 −2 |
| src/include/bootstrap/bootstrap.h | modified | +6 −9 |
| src/include/catalog/index.h | modified | +4 −7 |
| src/include/catalog/pg_proc.h | modified | +5 −5 |