pgsql: Track sort direction in SortGroupClause - Mailing list pgsql-committers

From Peter Eisentraut
Subject pgsql: Track sort direction in SortGroupClause
Date
Msg-id E1t0LsE-000ngB-3B@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/0d2aa4d4937bb0500823edfc7d620f4e5fa45b9c

Modified Files
--------------
src/backend/optimizer/path/pathkeys.c   |  4 +++-
src/backend/optimizer/plan/createplan.c |  1 +
src/backend/optimizer/plan/planagg.c    | 10 ++++++----
src/backend/parser/analyze.c            |  1 +
src/backend/parser/parse_clause.c       |  5 ++++-
src/backend/utils/cache/lsyscache.c     |  2 +-
src/include/catalog/catversion.h        |  2 +-
src/include/nodes/parsenodes.h          |  1 +
8 files changed, 18 insertions(+), 8 deletions(-)


pgsql-committers by date:

Previous
From: Peter Eisentraut
Date:
Subject: pgsql: Run pgperltidy on newly-added test code
Next
From: Masahiko Sawada
Date:
Subject: pgsql: Use construct_array_builtin for FLOAT8OID instead of construct_a