]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix arrays comparison in CompareOpclassOptions()
authorAlexander Korotkov <akorotkov@postgresql.org>
Mon, 11 Nov 2024 23:44:20 +0000 (01:44 +0200)
committerAlexander Korotkov <akorotkov@postgresql.org>
Mon, 11 Nov 2024 23:53:40 +0000 (01:53 +0200)
commitb242aba02666db82390fdb5a4734efde77156f61
tree373180f7c66a705d72b2fa815977eacca355d14b
parent8c9d34cdc4d213a57fa8b8a7197f7d6f22fca4c9
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
contrib/pg_trgm/expected/pg_trgm.out
contrib/pg_trgm/sql/pg_trgm.sql
src/backend/commands/indexcmds.c