minor MERGE cleanups

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: minor MERGE cleanups
Date: 2022-04-19 13:45:22
Message-ID: 202204191345.qerjy3kxi3eb@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

There's a complain from Coverity about outer_plan being referenced while
possibly NULL, which can be silenced by using an existing local
variable. 0001 does that.

0002 and 0003 are unrelated: in the former, we avoid creating a separate
local variable planSlot when we can just refer to the eponymous member
of ModifyTableContext. In the latter, we reduce the scope where
'lockmode' is defined by moving it from ModifyTableContext to
UpdateContext, which means we can save initializing it in a few spots;
this makes the code more natural.

I expect these fixups in new code should be uncontroversial.

--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/

Attachment Content-Type Size
0001-reuse-local-variable-to-silence-coverity.patch text/x-diff 861 bytes
0002-use-context.planSlot-instead-of-having-a-separate-pl.patch text/x-diff 3.7 KB
0003-Move-ModifyTableContext-lockmode-to-UpdateContext.patch text/x-diff 2.7 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message John Naylor 2022-04-19 13:55:34 Re: A qsort template
Previous Message Justin Pryzby 2022-04-19 13:39:28 Re: Fwd: Declarative partitioning and partition pruning/check (+postgis)