diff options
author | Alvaro Herrera | 2019-09-25 18:56:52 +0000 |
---|---|---|
committer | Alvaro Herrera | 2019-09-25 18:56:52 +0000 |
commit | 773df883e8f7543958d0d719c025b5f47c5a67f0 (patch) | |
tree | 1d27ebb1f3a767e20ebd9c4ccf1a8f2b16baf9bb /src/backend/commands/view.c | |
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/backend/commands/view.c')
-rw-r--r-- | src/backend/commands/view.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/backend/commands/view.c b/src/backend/commands/view.c index 9773bdc1c3d..bea890f177a 100644 --- a/src/backend/commands/view.c +++ b/src/backend/commands/view.c @@ -39,24 +39,6 @@ static void checkViewTupleDesc(TupleDesc newdesc, TupleDesc olddesc); /*--------------------------------------------------------------------- - * Validator for "check_option" reloption on views. The allowed values - * are "local" and "cascaded". - */ -void -validateWithCheckOption(const char *value) -{ - if (value == NULL || - (strcmp(value, "local") != 0 && - strcmp(value, "cascaded") != 0)) - { - ereport(ERROR, - (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("invalid value for \"check_option\" option"), - errdetail("Valid values are \"local\" and \"cascaded\"."))); - } -} - -/*--------------------------------------------------------------------- * DefineVirtualRelation * * Create a view relation and use the rules system to store the query |