]> granicus.if.org Git - postgresql/commitdiff
Fix thinko in copyParamList.
authorRobert Haas <rhaas@postgresql.org>
Wed, 27 Jul 2016 14:16:26 +0000 (10:16 -0400)
committerRobert Haas <rhaas@postgresql.org>
Wed, 27 Jul 2016 14:20:40 +0000 (10:20 -0400)
There's no point in consulting retval->paramMask; it's always NULL.
Instead, we should consult from->paramMask.

Reported by Andrew Gierth.

src/backend/nodes/params.c

index d7d513e78f0f23ea07f95eaacb115e2fb461d239..f2e26b80c46b58b5c7627a24cc422adffcb5dec6 100644 (file)
@@ -61,8 +61,8 @@ copyParamList(ParamListInfo from)
                bool            typByVal;
 
                /* Ignore parameters we don't need, to save cycles and space. */
-               if (retval->paramMask != NULL &&
-                       !bms_is_member(i, retval->paramMask))
+               if (from->paramMask != NULL &&
+                       !bms_is_member(i, from->paramMask))
                {
                        nprm->value = (Datum) 0;
                        nprm->isnull = true;