agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Amit Langote <amitlan@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix some const qualifier use in ri_triggers.c
Date: Wed, 22 Apr 2026 03:08:25 +0000
Message-ID: <E1wFNwu-00268w-2z@gemulon.postgresql.org> (raw)

Fix some const qualifier use in ri_triggers.c

The ri_FetchConstraintInfo() and ri_LoadConstraintInfo() functions
were declared to return const RI_ConstraintInfo *, but callers
sometimes need to modify the struct, requiring casts to drop the
const.  Remove the misapplied const qualifiers and the casts that
worked around them.

Reported-by: Peter Eisentraut <peter@eisentraut.org>
Author: Peter Eisentraut <peter@eisentraut.org>
Discussion: https://postgr.es/m/548600ed-8bbb-4e50-8fc3-65091b122276@eisentraut.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1b9dc2cb75745329fc133953a6e86f17ff472d36

Modified Files
--------------
src/backend/utils/adt/ri_triggers.c | 34 ++++++++++++++++------------------
1 file changed, 16 insertions(+), 18 deletions(-)



Message-ID: <E1wFNwu-00268w-2z@gemulon.postgresql.org>
Permalink:  ../E1wFNwu-00268w-2z@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1wFNwu-00268w-2z@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: amitlan@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Fix some const qualifier use in ri_triggers.c
  In-Reply-To: <E1wFNwu-00268w-2z@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox