• Andres Freund's avatar
    Fix CLUSTER on expression indexes. · cef82eda
    Andres Freund authored
    Since the introduction of different slot types, in 1a0586de, we
    create a virtual slot in tuplesort_begin_cluster(). While that looks
    right, it unfortunately doesn't actually work, as ExecStoreHeapTuple()
    is used to store tuples in the slot. Unfortunately no regression tests
    for CLUSTER on expression indexes existed so far.
    
    Fix the slot type, and add bare bones tests for CLUSTER on expression
    indexes.
    
    Reported-By: Justin Pryzby
    Author: Andres Freund
    Discussion: https://postgr.es/m/20191011210320.GS10470@telsasoft.com
    Backpatch: 12, like 1a0586de
    cef82eda
tuplesort.c 137 KB