pgsql: Support reloptions of enum type

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Support reloptions of enum type
Date: 2019-09-25 18:59:24
Message-ID: E1iDCVY-00087t-0Q@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2019-09-25 19:19:35 Re: pgsql: Support reloptions of enum type
Previous Message Alvaro Herrera 2019-09-25 17:36:11 pgsql: Split out recovery confing-writing code from pg_basebackup