Fix _equalA_Const

639a86e36a neglected to make the
necessary adjustments to _equalA_Const.  Found only via
COPY_PARSE_PLAN_TREES.
This commit is contained in:
Peter Eisentraut 2021-09-09 10:23:29 +02:00
parent 639a86e36a
commit 0ffbe900ce
1 changed files with 7 additions and 1 deletions

View File

@ -2409,8 +2409,14 @@ _equalParamRef(const ParamRef *a, const ParamRef *b)
static bool
_equalA_Const(const A_Const *a, const A_Const *b)
{
if (!equal(&a->val, &b->val)) /* hack for in-line val field */
/*
* Hack for in-line val field. Also val is not valid is isnull is
* true.
*/
if (!a->isnull && !b->isnull &&
!equal(&a->val, &b->val))
return false;
COMPARE_SCALAR_FIELD(isnull);
COMPARE_LOCATION_FIELD(location);
return true;