]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Don't call CheckAttributeType() with InvalidOid on dropped cols
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Thu, 23 Apr 2026 18:05:27 +0000 (21:05 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Thu, 23 Apr 2026 18:33:39 +0000 (21:33 +0300)
commitd2f58c42a2613cc65cddd7a223f85b6bfc0093fb
treea004924d6418afb5d6ed5e371a8fd9dfb553aa54
parentc7a1d5fc651371d6dac6e82f35e43b2adc81e72f
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
src/backend/catalog/heap.c