Skip to content

Commit 85c2b9a

Browse files
committed
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.
1 parent 9ae2661 commit 85c2b9a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/backend/catalog/partition.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1383,15 +1383,14 @@ get_qual_for_list(PartitionKey key, PartitionBoundSpec *spec)
13831383

13841384
if (nulltest1)
13851385
result = list_make2(nulltest1, opexpr);
1386-
else if (nulltest2)
1386+
else
13871387
{
13881388
Expr *or;
13891389

1390+
Assert(nulltest2 != NULL);
13901391
or = makeBoolExpr(OR_EXPR, list_make2(nulltest2, opexpr), -1);
13911392
result = list_make1(or);
13921393
}
1393-
else
1394-
result = list_make1(opexpr);
13951394

13961395
return result;
13971396
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy