summaryrefslogtreecommitdiff
path: root/src/backend/optimizer/path/pathkeys.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/optimizer/path/pathkeys.c')
-rw-r--r--src/backend/optimizer/path/pathkeys.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/backend/optimizer/path/pathkeys.c b/src/backend/optimizer/path/pathkeys.c
index 035bbaa3856..7cf15e89b63 100644
--- a/src/backend/optimizer/path/pathkeys.c
+++ b/src/backend/optimizer/path/pathkeys.c
@@ -256,6 +256,7 @@ static PathKey *
make_pathkey_from_sortop(PlannerInfo *root,
Expr *expr,
Oid ordering_op,
+ bool reverse_sort,
bool nulls_first,
Index sortref,
bool create_it)
@@ -279,7 +280,7 @@ make_pathkey_from_sortop(PlannerInfo *root,
opfamily,
opcintype,
collation,
- (strategy == BTGreaterStrategyNumber),
+ reverse_sort,
nulls_first,
sortref,
NULL,
@@ -1411,6 +1412,7 @@ make_pathkeys_for_sortclauses_extended(PlannerInfo *root,
pathkey = make_pathkey_from_sortop(root,
sortkey,
sortcl->sortop,
+ sortcl->reverse_sort,
sortcl->nulls_first,
sortcl->tleSortGroupRef,
true);