mirror of
https://github.com/postgres/postgres.git
synced 2025-12-21 05:21:08 +03:00
Reuse abbreviated keys in ordered [set] aggregates.
When processing ordered aggregates following a sort that could make use of the abbreviated key optimization, only call the equality operator to compare successive pairs of tuples when their abbreviated keys were not equal. Peter Geoghegan, reviewd by Andreas Karlsson and by me.
This commit is contained in:
@@ -93,13 +93,13 @@ extern void tuplesort_putdatum(Tuplesortstate *state, Datum val,
|
||||
extern void tuplesort_performsort(Tuplesortstate *state);
|
||||
|
||||
extern bool tuplesort_gettupleslot(Tuplesortstate *state, bool forward,
|
||||
TupleTableSlot *slot);
|
||||
TupleTableSlot *slot, Datum *abbrev);
|
||||
extern HeapTuple tuplesort_getheaptuple(Tuplesortstate *state, bool forward,
|
||||
bool *should_free);
|
||||
extern IndexTuple tuplesort_getindextuple(Tuplesortstate *state, bool forward,
|
||||
bool *should_free);
|
||||
extern bool tuplesort_getdatum(Tuplesortstate *state, bool forward,
|
||||
Datum *val, bool *isNull);
|
||||
Datum *val, bool *isNull, Datum *abbrev);
|
||||
|
||||
extern bool tuplesort_skiptuples(Tuplesortstate *state, int64 ntuples,
|
||||
bool forward);
|
||||
|
||||
Reference in New Issue
Block a user