pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add an assertion in get_object_address()
Date: Fri, 15 Nov 2024 08:03:07 +0000
Message-ID: <E1tBrIJ-001uFf-D6@gemulon.postgresql.org> (raw)

Add an assertion in get_object_address()

Some places declared a Relation before calling get_object_address()
only to assert that the relation is NULL after the call.

The new assertion allows passing NULL as the relation argument at
those places making the code cleaner and easier to understand.

Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Discussion: https://www.postgresql.org/message-id/ZzG34eNrT83W/Orz@ip-10-97-1-34.eu-west-3.compute.internal

Branch
------
master

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

Modified Files
--------------
src/backend/catalog/objectaddress.c |  9 +++++++--
src/backend/commands/alter.c        | 15 ++++-----------
2 files changed, 11 insertions(+), 13 deletions(-)



Message-ID: <E1tBrIJ-001uFf-D6@gemulon.postgresql.org>
Permalink:  ../E1tBrIJ-001uFf-D6@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1tBrIJ-001uFf-D6@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: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Add an assertion in get_object_address()
  In-Reply-To: <E1tBrIJ-001uFf-D6@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