• Tom Lane's avatar
    Support index-only scans in contrib/cube and contrib/seg GiST indexes. · de1d042f
    Tom Lane authored
    To do this, we only have to remove the compress and decompress support
    functions, which have never done anything more than detoasting.
    In the wake of commit d3a4f89d, this results in automatically enabling
    index-only scans, since the core code will now know that the stored
    representation is the same as the original data (up to detoasting).
    
    The only exciting part of this is that ALTER OPERATOR FAMILY lacks
    a way to drop a support function that was declared as being part of
    an opclass rather than being loose in the family.  For the moment,
    we'll hack our way to a solution with a manual update of the pg_depend
    entry type, which is what distinguishes the two cases.  Perhaps
    someday it'll be worth providing a cleaner way to do that, but for
    now it seems like a very niche problem.
    
    Note that the underlying C functions remain, to support use of the shared
    libraries with older versions of the modules' SQL declarations.  Someday
    we may be able to remove them, but not soon.
    
    Andrey Borodin, reviewed by me
    
    Discussion: https://postgr.es/m/D0F53A05-4F4A-4DEC-8339-3C069FA0EE11@yandex-team.ru
    de1d042f
seg_1.out 19.4 KB