diff --git a/.gitignore b/.gitignore index 794e35b..37331c2 100644 diff --git a/src/backend/access/common/reloptions.c b/src/backend/access/common/reloptions.c index fffab3a..fcf4766 100644 --- a/src/backend/access/common/reloptions.c +++ b/src/backend/access/common/reloptions.c @@ -433,8 +433,6 @@ static relopt_real realRelOpts[] = {{NULL}} }; -static relopt_enum_elt_def gist_buffering_enum_def[] = -GIST_OPTION_BUFFERING_ENUM_DEF; static relopt_enum_elt_def view_check_option_enum_def[] = VIEW_OPTION_CHECK_OPTION_ENUM_DEF; static relopt_enum enumRelOpts[] = @@ -446,8 +444,13 @@ static relopt_enum enumRelOpts[] = RELOPT_KIND_GIST, AccessExclusiveLock }, - gist_buffering_enum_def, - GIST_OPTION_BUFFERING_AUTO + { + {"on", GIST_OPTION_BUFFERING_ON }, + {"off", GIST_OPTION_BUFFERING_OFF }, + {"auto", GIST_OPTION_BUFFERING_AUTO }, + { NULL } + }, + GIST_OPTION_BUFFERING_AUTO }, { { diff --git a/src/include/access/gist_private.h b/src/include/access/gist_private.h index d586b04..047490a 100644 --- a/src/include/access/gist_private.h +++ b/src/include/access/gist_private.h @@ -379,24 +379,15 @@ typedef struct GISTBuildBuffers } GISTBuildBuffers; /* - * Buffering is an enum option - * gist_option_buffering_numeric_values defines a numeric representation of - * option values, and GIST_OPTION_BUFFERING_ENUM_DEF defines enum string values - * and maps them to numeric one. + * gist_option_buffering_values defines values for buffering enum reloption */ -typedef enum gist_option_buffering_numeric_values +typedef enum gist_option_buffering_values { GIST_OPTION_BUFFERING_ON = 0, GIST_OPTION_BUFFERING_OFF = 1, GIST_OPTION_BUFFERING_AUTO = 2, -} gist_option_buffering_numeric_values; - -#define GIST_OPTION_BUFFERING_ENUM_DEF { \ - { "on", GIST_OPTION_BUFFERING_ON }, \ - { "off", GIST_OPTION_BUFFERING_OFF }, \ - { "auto", GIST_OPTION_BUFFERING_AUTO }, \ - { (const char *) NULL, 0 } \ -} +} gist_option_buffering_numeric_values; + /* * Storage type for GiST's reloptions