pgsql: Add an assertion in get_object_address() - Mailing list pgsql-committers

From Peter Eisentraut
Subject pgsql: Add an assertion in get_object_address()
Date
Msg-id E1tBrIJ-001uFf-D6@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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(-)


pgsql-committers by date:

Previous
From: Michael Paquier
Date:
Subject: pgsql: Fix race conditions with drop of reused pgstats entries
Next
From: Heikki Linnakangas
Date:
Subject: pgsql: jit: Stop emitting some unnecessary instructions