pgsql: adjust_partition_colnos mustn't be called if not needed

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: adjust_partition_colnos mustn't be called if not needed
Date: 2022-04-12 13:21:47
Message-ID: E1neGSp-000Axc-Pk@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/183c869e1cbf69e7f5408ccb2121d37deec9956e

Modified Files
--------------
src/backend/executor/execPartition.c | 6 ++++++
1 file changed, 6 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2022-04-12 14:36:37 pgsql: Use WRITE_ENUM_FIELD for enum field
Previous Message Kyotaro Horiguchi 2022-04-12 10:54:58 Re: API stability [was: pgsql: Fix possible recovery trouble if TRUNCATE overlaps a checkpoint.]