Simplify index_[constraint_]create API
Alvaro Herrera <alvherre@alvh.no-ip.org>
Simplify index_[constraint_]create API Instead of passing large swaths of boolean arguments, define some flags that can be used in a bitmask. This makes it easier not only to figure out what each call site is doing, but also to add some new flags. The flags are split in two -- one set for index_create directly and another for constraints. index_create() itself receives both, and then passes down the latter to index_constraint_create(), which can also be called standalone. Discussion: https://postgr.es/m/20171023151251.j75uoe27gajdjmlm@alvherre.pgsql Reviewed-by: Simon Riggs
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/catalog/index.c | modified | +54 −51 |
| src/backend/catalog/toasting.c | modified | +1 −2 |
| src/backend/commands/indexcmds.c | modified | +25 −8 |
| src/backend/commands/tablecmds.c | modified | +8 −5 |
| src/include/catalog/index.h | modified | +16 −13 |
Discussion
- Proposal: Local indexes for partitioned table 142 messages · 2017-03-01 → 2018-01-25