mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Finish reverting "recheck_on_update" patch.
This reverts commitc203d6cf8
and some follow-on fixes, completing the task begun in commit5d28c9bd7
. If that feature is ever resurrected, the code will look quite a bit different from this, so it seems best to start from a clean slate. The v11 branch is not touched; in that branch, the recheck_on_update storage option remains present, but nonfunctional and undocumented. Discussion: https://postgr.es/m/20190114223409.3tcvejfhlvbucrv5@alap3.anarazel.de
This commit is contained in:
@ -129,15 +129,6 @@ static relopt_bool boolRelOpts[] =
|
||||
},
|
||||
true
|
||||
},
|
||||
{
|
||||
{
|
||||
"recheck_on_update",
|
||||
"Recheck functional index expression for changed value after update",
|
||||
RELOPT_KIND_INDEX,
|
||||
ShareUpdateExclusiveLock /* since only applies to later UPDATEs */
|
||||
},
|
||||
true
|
||||
},
|
||||
{
|
||||
{
|
||||
"security_barrier",
|
||||
@ -1343,7 +1334,7 @@ fillRelOptions(void *rdopts, Size basesize,
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (validate && !found && options[i].gen->kinds != RELOPT_KIND_INDEX)
|
||||
if (validate && !found)
|
||||
elog(ERROR, "reloption \"%s\" not found in parse table",
|
||||
options[i].gen->name);
|
||||
}
|
||||
@ -1501,40 +1492,6 @@ index_reloptions(amoptions_function amoptions, Datum reloptions, bool validate)
|
||||
return amoptions(reloptions, validate);
|
||||
}
|
||||
|
||||
/*
|
||||
* Parse generic options for all indexes.
|
||||
*
|
||||
* reloptions options as text[] datum
|
||||
* validate error flag
|
||||
*/
|
||||
bytea *
|
||||
index_generic_reloptions(Datum reloptions, bool validate)
|
||||
{
|
||||
int numoptions;
|
||||
GenericIndexOpts *idxopts;
|
||||
relopt_value *options;
|
||||
static const relopt_parse_elt tab[] = {
|
||||
{"recheck_on_update", RELOPT_TYPE_BOOL, offsetof(GenericIndexOpts, recheck_on_update)}
|
||||
};
|
||||
|
||||
options = parseRelOptions(reloptions, validate,
|
||||
RELOPT_KIND_INDEX,
|
||||
&numoptions);
|
||||
|
||||
/* if none set, we're done */
|
||||
if (numoptions == 0)
|
||||
return NULL;
|
||||
|
||||
idxopts = allocateReloptStruct(sizeof(GenericIndexOpts), options, numoptions);
|
||||
|
||||
fillRelOptions((void *) idxopts, sizeof(GenericIndexOpts), options, numoptions,
|
||||
validate, tab, lengthof(tab));
|
||||
|
||||
pfree(options);
|
||||
|
||||
return (bytea *) idxopts;
|
||||
}
|
||||
|
||||
/*
|
||||
* Option parser for attribute reloptions
|
||||
*/
|
||||
|
Reference in New Issue
Block a user