minor MERGE cleanups
Alvaro Herrera <alvherre@alvh.no-ip.org>
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Pg Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-04-19T13:45:22Z
Lists: pgsql-hackers
Attachments
- 0001-reuse-local-variable-to-silence-coverity.patch (text/x-diff)
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/
Commits
-
set_deparse_plan: Reuse variable to appease Coverity
- e70813fbc4aa 15.0 landed
-
Move ModifyTableContext->lockmode to UpdateContext
- a87e75956926 15.0 landed
-
ExecModifyTable: use context.planSlot instead of planSlot
- 3dcc6bf4068a 15.0 landed