I get these compiler warning about unused variables in the validation functions: brin.c: In function ‘brinvalidate’: brin.c:94:6: warning: variable ‘keytype’ set but not used [-Wunused-but-set-variable] keytype; ^ ginutil.c: In function ‘ginvalidate’: ginutil.c:86:6: warning: variable ‘keytype’ set but not used [-Wunused-but-set-variable] keytype; ^ gist.c: In function ‘gistvalidate’: gist.c:101:6: warning: variable ‘keytype’ set but not used [-Wunused-but-set-variable] keytype; ^ hash.c: In function ‘hashvalidate’: hash.c:103:6: warning: variable ‘keytype’ set but not used [-Wunused-but-set-variable] keytype; ^ nbtree.c: In function ‘btvalidate’: nbtree.c:134:6: warning: variable ‘keytype’ set but not used [-Wunused-but-set-variable] keytype; ^ nbtree.c:133:6: warning: variable ‘intype’ set but not used [-Wunused-but-set-variable] intype, ^ spgutils.c: In function ‘spgvalidate’: spgutils.c:88:6: warning: variable ‘keytype’ set but not used [-Wunused-but-set-variable] keytype; ^
These look like copy-pastos of boilerplate.
Fixed in the attached version of patch.
Another note is that amvalidate SQL interface is not documented anywhere. I know it's mainly meant for regression tests and we for example don't document hashing functions but it's something to think about/discuss maybe.