mirror of
https://github.com/postgres/postgres.git
synced 2025-05-05 09:19:17 +03:00
Fix custom validators call in build_local_reloptions()
We need to call them only when validate == true. Backpatch to 13, where opclass options were introduced. Reported-by: Tom Lane Discussion: https://postgr.es/m/2656633.1681831542%40sss.pgh.pa.us Reviewed-by: Tom Lane, Pavel Borisov Backpatch-through: 13
This commit is contained in:
parent
dde926b0f6
commit
9ef5a35837
@ -1963,6 +1963,7 @@ build_local_reloptions(local_relopts *relopts, Datum options, bool validate)
|
|||||||
fillRelOptions(opts, relopts->relopt_struct_size, vals, noptions, validate,
|
fillRelOptions(opts, relopts->relopt_struct_size, vals, noptions, validate,
|
||||||
elems, noptions);
|
elems, noptions);
|
||||||
|
|
||||||
|
if (validate)
|
||||||
foreach(lc, relopts->validators)
|
foreach(lc, relopts->validators)
|
||||||
((relopts_validator) lfirst(lc)) (opts, vals, noptions);
|
((relopts_validator) lfirst(lc)) (opts, vals, noptions);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user