diff options
Diffstat (limited to 'src/backend/optimizer/plan/createplan.c')
-rw-r--r-- | src/backend/optimizer/plan/createplan.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/backend/optimizer/plan/createplan.c b/src/backend/optimizer/plan/createplan.c index 1b118528141..134130476e4 100644 --- a/src/backend/optimizer/plan/createplan.c +++ b/src/backend/optimizer/plan/createplan.c @@ -3017,6 +3017,9 @@ create_indexscan_plan(PlannerInfo *root, /* it should be a base rel... */ Assert(baserelid > 0); Assert(best_path->path.parent->rtekind == RTE_RELATION); + /* check the scan direction is valid */ + Assert(best_path->indexscandir == ForwardScanDirection || + best_path->indexscandir == BackwardScanDirection); /* * Extract the index qual expressions (stripped of RestrictInfos) from the |