pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Amit Langote <amitlan@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove RI fast-path code for calling cast functions
Date: Thu, 15 Oct 2026 08:06:29 +0000
Message-ID: <E1xHGTt-00000001hxQ-2Cc9@gemulon.postgresql.org> (raw)

Remove RI fast-path code for calling cast functions

The previous commit stopped using the fast path when FK values need a
cast function, which leaves its code for calling them unused.  So
remove the following: the cached FmgrInfos for the cast and equality
functions and the memory context they used, the cast step in
build_index_scankeys(), the EXECUTE privilege check on the cast
function, and the unused forward declaration of RI_CompareHashEntry.

Also revert the changes made to ri_HashCompareOp() for the fast path's
cross-type operators and domain-typed keys in commits 2da86c1ef9 and
68ace967c1.  Fast-path code no longer uses the function.

Reviewed-by: Matheus Alcantara <matheusssilv97@gmail.com>
Discussion: https://postgr.es/m/CAM527d9BgPjeOOYmbCBTd57R145qHCk-dzw9qNq+nOrDq1j__A@mail.gmail.com
Backpatch-through: 19

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2e42f11b6c883bf43cdd6d3329f3025e7096ca38

Modified Files
--------------
src/backend/utils/adt/ri_triggers.c | 137 ++++++++++--------------------------
1 file changed, 39 insertions(+), 98 deletions(-)



view thread (2+ messages)  latest in thread

Message-ID: <E1xHGTt-00000001hxQ-2Cc9@gemulon.postgresql.org>
Permalink:  ../E1xHGTt-00000001hxQ-2Cc9@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1xHGTt-00000001hxQ-2Cc9@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: amitlan@postgresql.org
  Subject: Re: pgsql: Remove RI fast-path code for calling cast functions
  In-Reply-To: <E1xHGTt-00000001hxQ-2Cc9@gemulon.postgresql.org>
  References: <E1xHGTt-00000001hxQ-2Cc9@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