From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Simplify index_[constraint_]create API |
Date: | 2017-11-14 14:37:59 |
Message-ID: | E1eEcLf-0006c5-9d@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/a61f5ab986386628cf20b33971364475ce452412
Modified Files
--------------
src/backend/catalog/index.c | 105 ++++++++++++++++++++-------------------
src/backend/catalog/toasting.c | 3 +-
src/backend/commands/indexcmds.c | 33 +++++++++---
src/backend/commands/tablecmds.c | 13 +++--
src/include/catalog/index.h | 29 ++++++-----
5 files changed, 104 insertions(+), 79 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2017-11-14 17:33:15 | pgsql: Document changes in large-object privilege checking. |
Previous Message | Andres Freund | 2017-11-14 08:23:18 | Re: [HACKERS] [COMMITTERS] pgsql: Fix freezing of a dead HOT-updated tuple |