Skip to content
Snippets Groups Projects
  1. Feb 08, 2013
    • Tom Lane's avatar
      Make contrib/btree_gist's GiST penalty function a bit saner. · 9221f9d4
      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
    • Tom Lane's avatar
      Fix erroneous range-union logic for varlena types in contrib/btree_gist. · 94f565dc
      Tom Lane authored
      gbt_var_bin_union() failed to do the right thing when the existing range
      needed to be widened at both ends rather than just one end.  This could
      result in an invalid index in which keys that are present would not be
      found by searches, because the searches would not think they need to
      descend to the relevant leaf pages.  This error affected all the varlena
      datatypes supported by btree_gist (text, bytea, bit, numeric).
      
      Per investigation of a trouble report from Tomas Vondra.  (There is also
      an issue in gbt_var_penalty(), but that should only result in inefficiency
      not wrong answers.  I'm committing this separately so that we have a git
      state in which it can be tested that bad penalty results don't produce
      invalid indexes.)  Back-patch to all supported branches.
      94f565dc
  2. Aug 27, 2011
  3. Apr 23, 2011
    • Tom Lane's avatar
      Fix contrib/btree_gist to handle collations properly. · bb850306
      Tom Lane authored
      Make use of the collation attached to the index column, instead of
      hard-wiring DEFAULT_COLLATION_OID.  (Note: in theory this could require
      reindexing btree_gist indexes on textual columns, but I rather doubt anyone
      has one with a non-default declared collation as yet.)
      bb850306
  4. Apr 10, 2011
  5. Feb 08, 2011
    • Peter Eisentraut's avatar
      Per-column collation support · 414c5a2e
      Peter Eisentraut authored
      This adds collation support for columns and domains, a COLLATE clause
      to override it per expression, and B-tree index support.
      
      Peter Eisentraut
      reviewed by Pavel Stehule, Itagaki Takahiro, Robert Haas, Noah Misch
      414c5a2e
  6. Sep 20, 2010
  7. Aug 02, 2010
  8. Feb 26, 2010
  9. Dec 02, 2009
  10. Jun 11, 2009
  11. Jun 19, 2008
  12. May 17, 2008
    • Andrew Dunstan's avatar
      Add $PostgreSQL$ markers to a lot of files that were missing them. · 53972b46
      Andrew Dunstan authored
      This particular batch was just for *.c and *.h file.
      
      The changes were made with the following 2 commands:
      
      find . \( \( -name 'libstemmer' -o -name 'expected' -o -name 'ppport.h' \) -prune \) -o  \( -name '*.[ch]'  \) \( -exec grep -q '\$PostgreSQL' {} \; -o -print \) | while read file ; do head -n 1 < $file | grep -q '^/\*' && echo $file; done | xargs -l sed -i -e '1s/^\// /' -e '1i/*\n * $PostgreSQL:$ \n *'
      
      find . \( \( -name 'libstemmer' -o -name 'expected' -o -name 'ppport.h' \) -prune \) -o  \( -name '*.[ch]'  \) \( -exec grep -q '\$PostgreSQL' {} \; -o -print \) | xargs -l sed -i -e '1i/*\n * $PostgreSQL:$ \n */'
      53972b46
  13. Feb 28, 2007
    • Tom Lane's avatar
      Replace direct assignments to VARATT_SIZEP(x) with SET_VARSIZE(x, len). · 234a02b2
      Tom Lane authored
      Get rid of VARATT_SIZE and VARATT_DATA, which were simply redundant with
      VARSIZE and VARDATA, and as a consequence almost no code was using the
      longer names.  Rename the length fields of struct varlena and various
      derived structures to catch anyplace that was accessing them directly;
      and clean up various places so caught.  In itself this patch doesn't
      change any behavior at all, but it is necessary infrastructure if we hope
      to play any games with the representation of varlena headers.
      Greg Stark and Tom Lane
      234a02b2
  14. Oct 05, 2006
  15. Jul 14, 2006
  16. Jul 13, 2006
  17. Jul 11, 2006
  18. Jun 28, 2006
    • Teodor Sigaev's avatar
      Changes · 1f7ef548
      Teodor Sigaev authored
      * new split algorithm (as proposed in http://archives.postgresql.org/pgsql-hackers/2006-06/msg00254.php)
        * possible call pickSplit() for second and below columns
        * add spl_(l|r)datum_exists to GIST_SPLITVEC -
          pickSplit should check its values to use already defined
          spl_(l|r)datum for splitting. pickSplit should set
          spl_(l|r)datum_exists to 'false' (if they was 'true') to
          signal to caller about using spl_(l|r)datum.
        * support for old pickSplit(): not very optimal
          but correct split
      * remove 'bytes' field from GISTENTRY: in any case size of
        value is defined by it's type.
      * split GIST_SPLITVEC to two structures: one for using in picksplit
        and second - for internal use.
      * some code refactoring
      * support of subsplit to rtree opclasses
      
      TODO: add support of subsplit to contrib modules
      1f7ef548
  19. Oct 15, 2005
  20. Jul 01, 2005
    • Teodor Sigaev's avatar
      Fixes from Janko Richter <jankorichter@yahoo.de> · ef770cbb
      Teodor Sigaev authored
      - Fix wrong index results on text, char, varchar for multibyte strings
      - Fix some SIGFPE signals
      - Add support for infinite timestamps
      - Because of locale settings, btree_gist can not be a prefix index anymore (for text).
        Each node holds now just the lower and upper boundary.
      ef770cbb
  21. May 21, 2005
  22. May 16, 2005
  23. May 12, 2005
  24. Mar 01, 2005
  25. Aug 30, 2004
  26. Aug 29, 2004
  27. Aug 21, 2004
  28. Jun 03, 2004
  29. May 28, 2004
Loading