1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

revert "Throw error for ALTER TABLE RESET of an invalid option"

Reverts commits 73d78e11a0 and
b0488e5c4f.  Also reverts pg_upgrade
changes.
This commit is contained in:
Bruce Momjian
2014-08-25 20:07:37 -04:00
parent 2209b3923a
commit 6cb74a67e2
2 changed files with 1 additions and 36 deletions

View File

@ -307,8 +307,6 @@ static void initialize_reloptions(void);
static void parse_one_reloption(relopt_value *option, char *text_str,
int text_len, bool validate);
static bool is_valid_reloption(char *name);
/*
* initialize_reloptions
* initialization routine, must be called before parsing
@ -383,25 +381,6 @@ initialize_reloptions(void)
need_initialization = false;
}
/*
* is_valid_reloption
* check if a reloption exists
*
*/
static bool
is_valid_reloption(char *name)
{
int i;
for (i = 0; relOpts[i]; i++)
{
if (pg_strcasecmp(relOpts[i]->name, name) == 0)
return true;
}
return false;
}
/*
* add_reloption_kind
* Create a new relopt_kind value, to be used in custom reloptions by
@ -693,11 +672,6 @@ transformRelOptions(Datum oldOptions, List *defList, char *namspace,
if (isReset)
{
if (!is_valid_reloption(def->defname))
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("unrecognized parameter \"%s\"", def->defname)));
if (def->arg != NULL)
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),