Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 0ffbe90

Browse files
committed
Fix _equalA_Const
639a86e neglected to make the necessary adjustments to _equalA_Const. Found only via COPY_PARSE_PLAN_TREES.
1 parent 639a86e commit 0ffbe90

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/backend/nodes/equalfuncs.c

+7-1
Original file line numberDiff line numberDiff line change
@@ -2409,8 +2409,14 @@ _equalParamRef(const ParamRef *a, const ParamRef *b)
24092409
static bool
24102410
_equalA_Const(const A_Const *a, const A_Const *b)
24112411
{
2412-
if (!equal(&a->val, &b->val)) /* hack for in-line val field */
2412+
/*
2413+
* Hack for in-line val field. Also val is not valid is isnull is
2414+
* true.
2415+
*/
2416+
if (!a->isnull && !b->isnull &&
2417+
!equal(&a->val, &b->val))
24132418
return false;
2419+
COMPARE_SCALAR_FIELD(isnull);
24142420
COMPARE_LOCATION_FIELD(location);
24152421

24162422
return true;

0 commit comments

Comments
 (0)