1. 21 Sep, 2019 3 commits
    • Peter Eisentraut's avatar
      Remove removed file from nls.mk · 72c48c3f
      Peter Eisentraut authored
      part of revert "Add DECLARE STATEMENT support to ECPG."
      72c48c3f
    • Tom Lane's avatar
      Straighten out leakproofness markings on text comparison functions. · c160b892
      Tom Lane authored
      Since we introduced the idea of leakproof functions, texteq and textne
      were marked leakproof but their sibling text comparison functions were
      not.  This inconsistency seemed justified because texteq/textne just
      relied on memcmp() and so could easily be seen to be leakproof, while
      the other comparison functions are far more complex and indeed can
      throw input-dependent errors.
      
      However, that argument crashed and burned with the addition of
      nondeterministic collations, because now texteq/textne may invoke
      the exact same varstr_cmp() infrastructure as the rest.  It makes no
      sense whatever to give them different leakproofness markings.
      
      After a certain amount of angst we've concluded that it's all right
      to consider varstr_cmp() to be leakproof, mostly because the other
      choice would be disastrous for performance of many queries where
      leakproofness matters.  The input-dependent errors should only be
      reachable for corrupt input data, or so we hope anyway; certainly,
      if they are reachable in practice, we've got problems with requirements
      as basic as maintaining a btree index on a text column.
      
      Hence, run around to all the SQL functions that derive from varstr_cmp()
      and mark them leakproof.  This should result in a useful gain in
      flexibility/performance for queries in which non-leakproofness degrades
      the efficiency of the query plan.
      
      Back-patch to v12 where nondeterministic collations were added.
      While this isn't an essential bug fix given the determination
      that varstr_cmp() is leakproof, we might as well apply it now that
      we've been forced into a post-beta4 catversion bump.
      
      Discussion: https://postgr.es/m/31481.1568303470@sss.pgh.pa.us
      c160b892
    • Tom Lane's avatar
      Fix up handling of nondeterministic collations with pattern_ops opclasses. · 28103963
      Tom Lane authored
      text_pattern_ops and its siblings can't be used with nondeterministic
      collations, because they use the text_eq operator which will not behave
      as bitwise equality if applied with a nondeterministic collation.  The
      initial implementation of that restriction was to insert a run-time test
      in the related comparison functions, but that is inefficient, may throw
      misleading errors, and will throw errors in some cases that would work.
      It seems sufficient to just prevent the combination during CREATE INDEX,
      so do that instead.
      
      Lacking any better way to identify the opclasses involved, we need to
      hard-wire tests for them, which requires hand-assigned values for their
      OIDs, which forces a catversion bump because they previously had OIDs
      that would be assigned automatically.  That's slightly annoying in the
      v12 branch, but fortunately we're not at rc1 yet, so just do it.
      
      Back-patch to v12 where nondeterministic collations were added.
      
      In passing, run make reformat-dat-files, which found some unrelated
      whitespace issues (slightly different ones in HEAD and v12).
      
      Peter Eisentraut, with small corrections by me
      
      Discussion: https://postgr.es/m/22566.1568675619@sss.pgh.pa.us
      28103963
  2. 20 Sep, 2019 9 commits
  3. 19 Sep, 2019 10 commits
  4. 18 Sep, 2019 5 commits
  5. 17 Sep, 2019 3 commits
  6. 16 Sep, 2019 2 commits
  7. 15 Sep, 2019 3 commits
  8. 14 Sep, 2019 3 commits
  9. 13 Sep, 2019 2 commits