1. 17 Jun, 2018 1 commit
    • Tom Lane's avatar
      Suppress -Wshift-negative-value warnings. · 9b53d966
      Tom Lane authored
      Clean up four places that result in compiler warnings when using recent
      gcc with this warning class enabled (as seen on buildfarm members
      calliphoridae, skink, and others).  In all these places, this is purely
      cosmetic, because the shift distance could not be large enough to risk
      a change of sign, so there's no chance of implementation-dependent
      behavior.  Still, it's easy enough to avoid the warning by casting the
      shifted value to unsigned, so let's do that.
      
      Patch HEAD only, this isn't worth a back-patch.
      9b53d966
  2. 16 Jun, 2018 7 commits
  3. 15 Jun, 2018 3 commits
  4. 14 Jun, 2018 3 commits
  5. 13 Jun, 2018 4 commits
    • Tom Lane's avatar
      Code review for match_clause_to_partition_key(). · 91781335
      Tom Lane authored
      Fix inconsistent decisions about NOMATCH vs UNSUPPORTED result codes.
      If we're going to cater for partkeys that have the same expression and
      different collations, surely we should also support partkeys with the
      same expression and different opclasses.
      
      Clean up shaky handling of commuted opclauses, eg checking the wrong
      operator to see what its negator is.  This wouldn't cause any actual
      bugs given a sane opclass definition, but it doesn't seem helpful to
      expend more code to be less correct.
      
      Improve handling of null elements in ScalarArrayOp arrays: in the
      "op ALL" case, we can conclude they result in an unsatisfiable clause.
      
      Minor cosmetic changes and comment improvements.
      91781335
    • Tom Lane's avatar
      Fix some ill-chosen names for globally-visible partition support functions. · 19832753
      Tom Lane authored
      "compute_hash_value" is particularly gratuitously generic, but IMO
      all of these ought to have names clearly related to partitioning.
      19832753
    • Tom Lane's avatar
      Fix up run-time partition pruning's use of relcache's partition data. · e23bae82
      Tom Lane authored
      The previous coding saved pointers into the partitioned table's relcache
      entry, but then closed the relcache entry, causing those pointers to
      nominally become dangling.  Actual trouble would be seen in the field
      only if a relcache flush occurred mid-query, but that's hardly out of
      the question.
      
      While we could fix this by copying all the data in question at query
      start, it seems better to just hold the relcache entry open for the
      whole query.
      
      While at it, improve the handling of support-function lookups: do that
      once per query not once per pruning test.  There's still something to be
      desired here, in that we fail to exploit the possibility of caching data
      across queries in the fn_extra fields of the relcache's FmgrInfo structs,
      which could happen if we just used those structs in-place rather than
      copying them.  However, combining that with the possibility of per-query
      lookups of cross-type comparison functions seems to require changes in the
      APIs of a lot of the pruning support functions, so it's too invasive to
      consider as part of this patch.  A win would ensue only for complex
      partition key data types (e.g. arrays), so it may not be worth the
      trouble.
      
      David Rowley and Tom Lane
      
      Discussion: https://postgr.es/m/17850.1528755844@sss.pgh.pa.us
      e23bae82
    • Alexander Korotkov's avatar
      Documentation improvement for pg_trgm · e146e4d0
      Alexander Korotkov authored
      Documentation of word_similarity() and strict_word_similarity() functions
      contains some vague wordings which could confuse users.  This patch makes
      those wordings more clear.  word_similarity() was introduced in PostgreSQL 9.6,
      and corresponding part of documentation needs to be backpatched.
      
      Author: Bruce Momjian, Alexander Korotkov
      Discussion: https://postgr.es/m/20180526165648.GB12510%40momjian.us
      Backpatch: 9.6, where word_similarity() was introduced
      e146e4d0
  6. 12 Jun, 2018 5 commits
  7. 11 Jun, 2018 13 commits
  8. 10 Jun, 2018 4 commits