Skip to content

Commit cd115c3

Browse files
committed
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
1 parent 0ec0e20 commit cd115c3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/backend/access/common/reloptions.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1969,8 +1969,9 @@ build_local_reloptions(local_relopts *relopts, Datum options, bool validate)
19691969
fillRelOptions(opts, relopts->relopt_struct_size, vals, noptions, validate,
19701970
elems, noptions);
19711971

1972-
foreach(lc, relopts->validators)
1973-
((relopts_validator) lfirst(lc)) (opts, vals, noptions);
1972+
if (validate)
1973+
foreach(lc, relopts->validators)
1974+
((relopts_validator) lfirst(lc)) (opts, vals, noptions);
19741975

19751976
if (elems)
19761977
pfree(elems);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy