mirror of
https://github.com/postgres/postgres.git
synced 2025-10-15 05:46:52 +03:00
Track sort direction in SortGroupClause
Functions make_pathkey_from_sortop() and transformWindowDefinitions(), which receive a SortGroupClause, were determining the sort order (ascending vs. descending) by comparing that structure's operator strategy to BTLessStrategyNumber, but could just as easily have gotten it from the SortGroupClause object, if it had such a field, so add one. This reduces the number of places that hardcode the assumption that the strategy refers specifically to a btree strategy, rather than some other index AM's operators. Author: Mark Dilger <mark.dilger@enterprisedb.com> Discussion: https://www.postgresql.org/message-id/flat/E72EAA49-354D-4C2E-8EB9-255197F55330@enterprisedb.com
This commit is contained in:
2
src/backend/utils/cache/lsyscache.c
vendored
2
src/backend/utils/cache/lsyscache.c
vendored
@@ -289,7 +289,7 @@ get_equality_op_for_ordering_op(Oid opno, bool *reverse)
|
||||
|
||||
/*
|
||||
* get_ordering_op_for_equality_op
|
||||
* Get the OID of a datatype-specific btree ordering operator
|
||||
* Get the OID of a datatype-specific btree "less than" ordering operator
|
||||
* associated with an equality operator. (If there are multiple
|
||||
* possibilities, assume any one will do.)
|
||||
*
|
||||
|
Reference in New Issue
Block a user