Fix arrays comparison in CompareOpclassOptions()

Alexander Korotkov <akorotkov@postgresql.org>

Commit: b242aba02666db82390fdb5a4734efde77156f61
Author: Alexander Korotkov <akorotkov@postgresql.org>
Date: 2024-11-11T23:53:40Z
Releases: 16.6
Fix arrays comparison in CompareOpclassOptions()

The current code calls array_eq() and does not provide FmgrInfo.  This commit
provides initialization of FmgrInfo and uses C collation as the safe option
for text comparison because we don't know anything about the semantics of
opclass options.

Backpatch to 13, where opclass options were introduced.

Reported-by: Nicolas Maus
Discussion: https://postgr.es/m/18692-72ea398df3ec6712%40postgresql.org
Backpatch-through: 13

Files

Discussion