diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2019-09-25 15:56:52 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2019-09-25 15:56:52 -0300 |
commit | 773df883e8f7543958d0d719c025b5f47c5a67f0 (patch) | |
tree | 1d27ebb1f3a767e20ebd9c4ccf1a8f2b16baf9bb /src/include/access/gist_private.h | |
parent | caba97a9d9f4d4fa2531985fd12d3cd823da06f3 (diff) |
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
Diffstat (limited to 'src/include/access/gist_private.h')
-rw-r--r-- | src/include/access/gist_private.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/include/access/gist_private.h b/src/include/access/gist_private.h index ab134c1a394..a409975db16 100644 --- a/src/include/access/gist_private.h +++ b/src/include/access/gist_private.h @@ -380,6 +380,14 @@ typedef struct GISTBuildBuffers int rootlevel; } GISTBuildBuffers; +/* GiSTOptions->buffering_mode values */ +typedef enum GistOptBufferingMode +{ + GIST_OPTION_BUFFERING_AUTO, + GIST_OPTION_BUFFERING_ON, + GIST_OPTION_BUFFERING_OFF +} GistOptBufferingMode; + /* * Storage type for GiST's reloptions */ @@ -387,7 +395,7 @@ typedef struct GiSTOptions { int32 vl_len_; /* varlena header (do not touch directly!) */ int fillfactor; /* page fill factor in percent (0..100) */ - int bufferingModeOffset; /* use buffering build? */ + GistOptBufferingMode buffering_mode; /* buffering build mode */ } GiSTOptions; /* gist.c */ |