pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexander Korotkov <akorotkov@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix arrays comparison in CompareOpclassOptions()
Date: Tue, 12 Nov 2024 00:03:10 +0000
Message-ID: <E1tAeNC-001NSd-Aa@gemulon.postgresql.org> (raw)

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/db22b900244d3c51918acce44cbe5bb6f6507d32

Modified Files
--------------
contrib/pg_trgm/expected/pg_trgm.out |  3 +++
contrib/pg_trgm/sql/pg_trgm.sql      |  4 ++++
src/backend/commands/indexcmds.c     | 11 +++++++++--
3 files changed, 16 insertions(+), 2 deletions(-)



view thread (10+ messages)  latest in thread

Message-ID: <E1tAeNC-001NSd-Aa@gemulon.postgresql.org>
Permalink:  ../E1tAeNC-001NSd-Aa@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1tAeNC-001NSd-Aa@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: akorotkov@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Fix arrays comparison in CompareOpclassOptions()
  In-Reply-To: <E1tAeNC-001NSd-Aa@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox