pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Simplify index_[constraint_]create API
Date: Tue, 14 Nov 2017 14:37:59 +0000
Message-ID: <E1eEcLf-0006c5-9d@gemulon.postgresql.org> (raw)

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(-)



Message-ID: <E1eEcLf-0006c5-9d@gemulon.postgresql.org>
Permalink:  ../E1eEcLf-0006c5-9d@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1eEcLf-0006c5-9d@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: alvherre@alvh.no-ip.org
  Subject: Re: pgsql: Simplify index_[constraint_]create API
  In-Reply-To: <E1eEcLf-0006c5-9d@gemulon.postgresql.org>
  References: <E1eEcLf-0006c5-9d@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox