Skip to content
Snippets Groups Projects
Select Git revision
  • benchmark-tools
  • postgres-lambda
  • master default
  • REL9_4_25
  • REL9_5_20
  • REL9_6_16
  • REL_10_11
  • REL_11_6
  • REL_12_1
  • REL_12_0
  • REL_12_RC1
  • REL_12_BETA4
  • REL9_4_24
  • REL9_5_19
  • REL9_6_15
  • REL_10_10
  • REL_11_5
  • REL_12_BETA3
  • REL9_4_23
  • REL9_5_18
  • REL9_6_14
  • REL_10_9
  • REL_11_4
23 results

btree_gist

  • Clone with SSH
  • Clone with HTTPS
  • user avatar
    Tom Lane authored
    The previous coding supposed that the first differing bytes in two varlena
    datums must have the same sign difference as their overall comparison
    result.  This is obviously bogus for text strings in non-C locales, and
    probably wrong for numeric, and even for bytea I think it was wrong on
    machines where char is signed.  When the assumption failed, the function
    could deliver a zero or negative penalty in situations where such a result
    is quite ridiculous, leading the core GiST code to make very bad page-split
    decisions.
    
    To fix, take the absolute values of the byte-level differences.  Also,
    switch the code to using unsigned char not just char, so that the behavior
    will be consistent whether char is signed or not.
    
    Per investigation of a trouble report from Tomas Vondra.  Back-patch to all
    supported branches.
    9221f9d4
    History
    Name Last commit Last update
    ..