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@lists.postgresql.org
Subject: pgsql: Support reloptions of enum type
Date: Wed, 25 Sep 2019 18:59:24 +0000
Message-ID: <E1iDCVY-00087t-0Q@gemulon.postgresql.org> (raw)

Support reloptions of enum type

All our current in core relation options of type string (not many,
admittedly) behave in reality like enums.  But after seeing an
implementation for enum reloptions, it's clear that strings are messier,
so introduce the new reloption type.  Switch all string options to be
enums instead.

Fortunately we have a recently introduced test module for reloptions, so
we don't lose coverage of string reloptions, which may still be used by
third-party modules.

Authors: Nikolay Shaplov, Álvaro Herrera
Reviewed-by: Nikita Glukhov, Aleksandr Parfenov
Discussion: https://postgr.es/m/43332102.S2V5pIjXRx@x200m

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/773df883e8f7543958d0d719c025b5f47c5a67f0

Modified Files
--------------
src/backend/access/common/reloptions.c             | 132 +++++++++++++++++++--
src/backend/access/gist/gistbuild.c                |  25 +---
src/backend/access/gist/gistutil.c                 |   2 +-
src/backend/commands/view.c                        |  18 ---
src/include/access/gist_private.h                  |  10 +-
src/include/access/reloptions.h                    |  24 ++++
src/include/commands/view.h                        |   2 -
src/include/utils/rel.h                            |  25 ++--
src/test/modules/dummy_index_am/dummy_index_am.c   |  37 ++++--
src/test/modules/dummy_index_am/sql/reloptions.sql |  10 ++
src/test/regress/expected/gist.out                 |   2 +-
src/test/regress/expected/updatable_views.out      |   2 +-
12 files changed, 214 insertions(+), 75 deletions(-)



view thread (6+ messages)  latest in thread

Message-ID: <E1iDCVY-00087t-0Q@gemulon.postgresql.org>
Permalink:  ../E1iDCVY-00087t-0Q@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1iDCVY-00087t-0Q@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: Support reloptions of enum type
  In-Reply-To: <E1iDCVY-00087t-0Q@gemulon.postgresql.org>
  References: <E1iDCVY-00087t-0Q@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