pgsql: Don't call CheckAttributeType() with InvalidOid on dropped cols - Mailing list pgsql-committers

From Heikki Linnakangas
Subject pgsql: Don't call CheckAttributeType() with InvalidOid on dropped cols
Date
Msg-id E1wFz6P-002NKc-1w@gemulon.postgresql.org
Whole thread
List pgsql-committers
Don't call CheckAttributeType() with InvalidOid on dropped cols

If CheckAttributeType() is called with InvalidOid, it performs a bunch
of pointless, futile syscache lookups with InvalidOid, but ultimately
tolerates it and has no effect. We were calling it with InvalidOid on
dropped columns, but it seems accidental that it works, so let's stop
doing it.

Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://www.postgresql.org/message-id/93ce56cd-02a6-4db1-8224-c8999372facc@iki.fi
Backpatch-through: 14

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/526d9ca619cc466fd637a7545c0d3ad3ea7bc6cf

Modified Files
--------------
src/backend/catalog/heap.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)


pgsql-committers by date:

Previous
From: Álvaro Herrera
Date:
Subject: pgsql: Move REPACK (CONCURRENTLY) test out of stock regression tests
Next
From: Peter Eisentraut
Date:
Subject: pgsql: Add missing source files to several nls.mk