adjust_partition_colnos mustn't be called if not needed

Alvaro Herrera <alvherre@alvh.no-ip.org>

Commit: 183c869e1cbf69e7f5408ccb2121d37deec9956e
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: 2022-04-12T13:19:57Z
Releases: 15.0
adjust_partition_colnos mustn't be called if not needed

Add an assert to make this very explicit, as well as a code comment.
The former should silence Coverity complaining about this.

Introduced by 7103ebb7aae8.

Reported-by: Ranier Vilela
Discussion: https://postgr.es/m/CAEudQAqTTAOzXiYybab+1DQOb3ZUuK99=p_KD+yrRFhcDbd0jg@mail.gmail.com

Files

PathChange+/−
src/backend/executor/execPartition.c modified +6 −0

Discussion