Skip to content
Snippets Groups Projects
  1. Mar 27, 2015
  2. Mar 26, 2015
    • Heikki Linnakangas's avatar
      Minor refactoring of btree_gist code. · 8816af65
      Heikki Linnakangas authored
      The gbt_var_key_copy function was doing two different things depending on
      the boolean argument. Seems cleaner to have two separate functions.
      
      Remove unused argument from gbt_num_compress.
      8816af65
  3. May 16, 2014
    • Tom Lane's avatar
      Fix valgrind warning for btree_gist indexes on macaddr. · 82bbb60c
      Tom Lane authored
      The macaddr opclass stores two macaddr structs (each of size 6) in an
      index column that's declared as being of type gbtreekey16, ie 16 bytes.
      In the original coding this led to passing a palloc'd value of size 12
      to the index insertion code, so that data would be fetched past the
      end of the allocated value during index tuple construction.  This makes
      valgrind unhappy.  In principle it could result in a SIGSEGV, though
      with the current implementation of palloc there's no risk since
      the 12-byte request size would be rounded up to 16 bytes anyway.
      
      To fix, add a field to struct gbtree_ninfo showing the declared size of
      the index datums, and use that in the palloc requests; and use palloc0
      to be sure that any wasted bytes are cleanly initialized.
      
      Per report from Andres Freund.  No back-patch since there's no current
      risk of a real problem.
      82bbb60c
  4. Apr 18, 2014
    • Peter Eisentraut's avatar
      Create function prototype as part of PG_FUNCTION_INFO_V1 macro · e7128e8d
      Peter Eisentraut authored
      Because of gcc -Wmissing-prototypes, all functions in dynamically
      loadable modules must have a separate prototype declaration.  This is
      meant to detect global functions that are not declared in header files,
      but in cases where the function is called via dfmgr, this is redundant.
      Besides filling up space with boilerplate, this is a frequent source of
      compiler warnings in extension modules.
      
      We can fix that by creating the function prototype as part of the
      PG_FUNCTION_INFO_V1 macro, which such modules have to use anyway.  That
      makes the code of modules cleaner, because there is one less place where
      the entry points have to be listed, and creates an additional check that
      functions have the right prototype.
      
      Remove now redundant prototypes from contrib and other modules.
      e7128e8d
  5. Sep 11, 2011
    • Peter Eisentraut's avatar
      Remove many -Wcast-qual warnings · 1b81c2fe
      Peter Eisentraut authored
      This addresses only those cases that are easy to fix by adding or
      moving a const qualifier or removing an unnecessary cast.  There are
      many more complicated cases remaining.
      1b81c2fe
  6. Aug 27, 2011
  7. Apr 10, 2011
  8. Mar 02, 2011
  9. Sep 20, 2010
  10. Feb 26, 2010
  11. Dec 02, 2009
  12. Jun 11, 2009
  13. 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
  14. Apr 21, 2008
    • Tom Lane's avatar
      Allow float8, int8, and related datatypes to be passed by value on machines · 8472bf7a
      Tom Lane authored
      where Datum is 8 bytes wide.  Since this will break old-style C functions
      (those still using version 0 calling convention) that have arguments or
      results of these types, provide a configure option to disable it and retain
      the old pass-by-reference behavior.  Likewise, provide a configure option
      to disable the recently-committed float4 pass-by-value change.
      
      Zoltan Boszormenyi, plus configurability stuff by me.
      8472bf7a
  15. Apr 14, 2008
    • Tom Lane's avatar
      Push index operator lossiness determination down to GIST/GIN opclass · 9b5c8d45
      Tom Lane authored
      "consistent" functions, and remove pg_amop.opreqcheck, as per recent
      discussion.  The main immediate benefit of this is that we no longer need
      8.3's ugly hack of requiring @@@ rather than @@ to test weight-using tsquery
      searches on GIN indexes.  In future it should be possible to optimize some
      other queries better than is done now, by detecting at runtime whether the
      index match is exact or not.
      
      Tom Lane, after an idea of Heikki's, and with some help from Teodor.
      9b5c8d45
  16. Oct 15, 2005
  17. 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
  18. Aug 29, 2004
  19. Jun 03, 2004
  20. May 28, 2004
Loading