1. 31 Jul, 2018 4 commits
    • Tom Lane's avatar
      Further fixes for quoted-list GUC values in pg_dump and ruleutils.c. · f3eb76b3
      Tom Lane authored
      Commits 74286994 et al turn out to be a couple bricks shy of a load.
      We were dumping the stored values of GUC_LIST_QUOTE variables as they
      appear in proconfig or setconfig catalog columns.  However, although that
      quoting rule looks a lot like SQL-identifier double quotes, there are two
      critical differences: empty strings ("") are legal, and depending on which
      variable you're considering, values longer than NAMEDATALEN might be valid
      too.  So the current technique fails altogether on empty-string list
      entries (as reported by Steven Winfield in bug #15248) and it also risks
      truncating file pathnames during dump/reload of GUC values that are lists
      of pathnames.
      
      To fix, split the stored value without any downcasing or truncation,
      and then emit each element as a SQL string literal.
      
      This is a tad annoying, because we now have three copies of the
      comma-separated-string splitting logic in varlena.c as well as a fourth
      one in dumputils.c.  (Not to mention the randomly-different-from-those
      splitting logic in libpq...)  I looked at unifying these, but it would
      be rather a mess unless we're willing to tweak the API definitions of
      SplitIdentifierString, SplitDirectoriesString, or both.  That might be
      worth doing in future; but it seems pretty unsafe for a back-patched
      bug fix, so for now accept the duplication.
      
      Back-patch to all supported branches, as the previous fix was.
      
      Discussion: https://postgr.es/m/7585.1529435872@sss.pgh.pa.us
      f3eb76b3
    • Alvaro Herrera's avatar
      23ca82d7
    • Andrew Dunstan's avatar
      Remove SGMLism from commit 2d36a5e9 · ed0cfde2
      Andrew Dunstan authored
      ed0cfde2
    • Andrew Dunstan's avatar
      Provide a log_level setting for auto_explain · 2d36a5e9
      Andrew Dunstan authored
      Up to now the log level has been hardcoded at LOG. A new
      auto_explain.log_level setting allows that to be modified.
      
      Discussion: https://postgr.es/m/CAPPfruyZh+snR2AdmutrA0B_caj=yWZkLqxUTZYNjJCaQ_wKQg@mail.gmail.com
      
      Tom Dunstan and Andrew Dunstan
      Reviewed by Daniel Gustafsson
      2d36a5e9
  2. 30 Jul, 2018 9 commits
  3. 29 Jul, 2018 8 commits
  4. 28 Jul, 2018 5 commits
  5. 27 Jul, 2018 5 commits
  6. 26 Jul, 2018 2 commits
    • Tom Lane's avatar
      Provide plpgsql tests for cases involving record field changes. · 9f77ad26
      Tom Lane authored
      We suppressed one of these test cases in commit feb1cc55 because
      it was failing to produce the expected results on CLOBBER_CACHE_ALWAYS
      buildfarm members.  But now we need another test with similar behavior,
      so let's set up a test file that is expected to vary between regular and
      CLOBBER_CACHE_ALWAYS cases, and provide variant expected files.
      
      Someday we should fix plpgsql's failure for change-of-field-type, and
      then the discrepancy will go away and we can fold these tests back
      into plpgsql_record.sql.  But today is not that day.
      
      Discussion: https://postgr.es/m/87wotkfju1.fsf@news-spur.riddles.org.uk
      9f77ad26
    • Tom Lane's avatar
      Avoid crash in eval_const_expressions if a Param's type changes. · 662d12ae
      Tom Lane authored
      Since commit 6719b238 it's been possible for the values of plpgsql
      record field variables to be exposed to the planner as Params.
      (Before that, plpgsql never supplied values for such variables during
      planning, so that the problematic code wasn't reached.)  Other places
      that touch potentially-type-mutable Params either cope gracefully or
      do runtime-test-and-ereport checks that the type is what they expect.
      But eval_const_expressions() just had an Assert, meaning that it either
      failed the assertion or risked crashes due to using an incompatible
      value.
      
      In this case, rather than throwing an ereport immediately, we can just
      not perform a const-substitution in case of a mismatch.  This seems
      important for the same reason that the Param fetch was speculative:
      we might not actually reach this part of the expression at runtime.
      
      Test case will follow in a separate commit.
      
      Patch by me, pursuant to bug report from Andrew Gierth.
      Back-patch to v11 where the previous commit appeared.
      
      Discussion: https://postgr.es/m/87wotkfju1.fsf@news-spur.riddles.org.uk
      662d12ae
  7. 25 Jul, 2018 2 commits
  8. 24 Jul, 2018 5 commits