Add an assertion in get_object_address()
authorPeter Eisentraut
Fri, 15 Nov 2024 07:42:59 +0000 (08:42 +0100)
committerPeter Eisentraut
Fri, 15 Nov 2024 07:52:43 +0000 (08:52 +0100)
commite468ec0fddcd93e282da6685b75d5687c2a87f2a
tree1c4a33420fd0587ca42cd37cb275637f49610fa1
parent818119afccd342823e5b638be51f64ba36221318
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 
Discussion: https://www.postgresql.org/message-id/ZzG34eNrT83W/[email protected]
src/backend/catalog/objectaddress.c
src/backend/commands/alter.c