]> granicus.if.org Git - postgresql/commit
Support reloptions of enum type
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Wed, 25 Sep 2019 18:56:52 +0000 (15:56 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Wed, 25 Sep 2019 18:56:52 +0000 (15:56 -0300)
commit773df883e8f7543958d0d719c025b5f47c5a67f0
tree1d27ebb1f3a767e20ebd9c4ccf1a8f2b16baf9bb
parentcaba97a9d9f4d4fa2531985fd12d3cd823da06f3
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
12 files changed:
src/backend/access/common/reloptions.c
src/backend/access/gist/gistbuild.c
src/backend/access/gist/gistutil.c
src/backend/commands/view.c
src/include/access/gist_private.h
src/include/access/reloptions.h
src/include/commands/view.h
src/include/utils/rel.h
src/test/modules/dummy_index_am/dummy_index_am.c
src/test/modules/dummy_index_am/sql/reloptions.sql
src/test/regress/expected/gist.out
src/test/regress/expected/updatable_views.out