mirror of
https://github.com/postgres/postgres.git
synced 2025-09-08 00:47:37 +03:00
Make more use of castNode()
This commit is contained in:
@@ -1273,12 +1273,11 @@ generate_bitmap_or_paths(PlannerInfo *root, RelOptInfo *rel,
|
||||
|
||||
foreach(lc, clauses)
|
||||
{
|
||||
RestrictInfo *rinfo = (RestrictInfo *) lfirst(lc);
|
||||
RestrictInfo *rinfo = castNode(RestrictInfo, lfirst(lc));
|
||||
List *pathlist;
|
||||
Path *bitmapqual;
|
||||
ListCell *j;
|
||||
|
||||
Assert(IsA(rinfo, RestrictInfo));
|
||||
/* Ignore RestrictInfos that aren't ORs */
|
||||
if (!restriction_is_or_clause(rinfo))
|
||||
continue;
|
||||
@@ -1310,10 +1309,10 @@ generate_bitmap_or_paths(PlannerInfo *root, RelOptInfo *rel,
|
||||
}
|
||||
else
|
||||
{
|
||||
RestrictInfo *rinfo = castNode(RestrictInfo, orarg);
|
||||
List *orargs;
|
||||
|
||||
Assert(IsA(orarg, RestrictInfo));
|
||||
Assert(!restriction_is_or_clause((RestrictInfo *) orarg));
|
||||
Assert(!restriction_is_or_clause(rinfo));
|
||||
orargs = list_make1(orarg);
|
||||
|
||||
indlist = build_paths_for_OR(root, rel,
|
||||
@@ -2174,9 +2173,8 @@ match_clauses_to_index(IndexOptInfo *index,
|
||||
|
||||
foreach(lc, clauses)
|
||||
{
|
||||
RestrictInfo *rinfo = (RestrictInfo *) lfirst(lc);
|
||||
RestrictInfo *rinfo = castNode(RestrictInfo, lfirst(lc));
|
||||
|
||||
Assert(IsA(rinfo, RestrictInfo));
|
||||
match_clause_to_index(index, rinfo, clauseset);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user