mirror of
https://github.com/postgres/postgres.git
synced 2025-06-16 06:01:02 +03:00
Code review of get_qual_for_list.
We need not consider the case where both nulltest1 and nulltest2 are NULL; the partition either accepts nulls or it does not. Jeevan Ladhe. I added an assertion.
This commit is contained in:
@ -1383,15 +1383,14 @@ get_qual_for_list(PartitionKey key, PartitionBoundSpec *spec)
|
|||||||
|
|
||||||
if (nulltest1)
|
if (nulltest1)
|
||||||
result = list_make2(nulltest1, opexpr);
|
result = list_make2(nulltest1, opexpr);
|
||||||
else if (nulltest2)
|
else
|
||||||
{
|
{
|
||||||
Expr *or;
|
Expr *or;
|
||||||
|
|
||||||
|
Assert(nulltest2 != NULL);
|
||||||
or = makeBoolExpr(OR_EXPR, list_make2(nulltest2, opexpr), -1);
|
or = makeBoolExpr(OR_EXPR, list_make2(nulltest2, opexpr), -1);
|
||||||
result = list_make1(or);
|
result = list_make1(or);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
result = list_make1(opexpr);
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user