1. 02 Nov, 2017 5 commits
  2. 01 Nov, 2017 6 commits
  3. 31 Oct, 2017 5 commits
  4. 30 Oct, 2017 4 commits
    • Tom Lane's avatar
      Doc: call out UPDATE syntax change as a v10 compatibility issue. · 86182b18
      Tom Lane authored
      The change made by commit 906bfcad means that if you're writing
      a parenthesized column list in UPDATE ... SET, but that column list
      is only one column, you now need to write ROW(expression) on the
      righthand side, not just a parenthesized expression.  This was an
      intentional change for spec compatibility and potential future
      expansion of the possibilities for the RHS, but I'd neglected to
      document it as a compatibility issue, figuring that hardly anyone
      would bother with parenthesized syntax for a single target column.
      I was wrong, as shown by questions from Justin Pryzby, Adam Brusselback,
      and others.  Move the release note item into the compatibility section
      and point out the behavior change for a single target column.
      
      Discussion: https://postgr.es/m/CAMjNa7cDLzPcs0xnRpkvqmJ6Vb6G3EH8CYGp9ZBjXdpFfTz6dg@mail.gmail.com
      86182b18
    • Alvaro Herrera's avatar
      Fix autovacuum work item error handling · be72b9c3
      Alvaro Herrera authored
      In autovacuum's "work item" processing, a few strings were allocated in
      the current transaction's memory context, which goes away during error
      handling; if an error happened during execution of the work item, the
      pfree() calls to clean up afterwards would try to release already-released
      memory, possibly leading to a crash.  In branch master, this was already
      fixed by commit 335f3d04, so backpatch that to REL_10_STABLE to fix
      the problem there too.
      
      As a secondary problem, verify that the autovacuum worker is connected
      to the right database for each work item; otherwise some items would be
      discarded by workers in other databases.
      
      Reported-by: Justin Pryzby
      Discussion: https://postgr.es/m/20171014035732.GB31726@telsasoft.com
      be72b9c3
    • Magnus Hagander's avatar
      Fix typo · 77954f99
      Magnus Hagander authored
      77954f99
    • Magnus Hagander's avatar
      Fix typo in comment · 854b643c
      Magnus Hagander authored
      Etsuro Fujita
      854b643c
  5. 29 Oct, 2017 3 commits
  6. 28 Oct, 2017 6 commits
  7. 27 Oct, 2017 8 commits
  8. 26 Oct, 2017 3 commits
    • Tom Lane's avatar
      Support domains over composite types in PL/Tcl. · 820c0305
      Tom Lane authored
      Since PL/Tcl does little with SQL types internally, this is just a
      matter of making it work with composite-domain function arguments
      and results.
      
      In passing, make it allow RECORD-type arguments --- that's a trivial
      change that nobody had bothered with up to now.
      
      Discussion: https://postgr.es/m/4206.1499798337@sss.pgh.pa.us
      820c0305
    • Tom Lane's avatar
      Support domains over composite types. · 37a795a6
      Tom Lane authored
      This is the last major omission in our domains feature: you can now
      make a domain over anything that's not a pseudotype.
      
      The major complication from an implementation standpoint is that places
      that might be creating tuples of a domain type now need to be prepared
      to apply domain_check().  It seems better that unprepared code fail
      with an error like "<type> is not composite" than that it silently fail
      to apply domain constraints.  Therefore, relevant infrastructure like
      get_func_result_type() and lookup_rowtype_tupdesc() has been adjusted
      to treat domain-over-composite as a distinct case that unprepared code
      won't recognize, rather than just transparently treating it the same
      as plain composite.  This isn't a 100% solution to the possibility of
      overlooked domain checks, but it catches most places.
      
      In passing, improve typcache.c's support for domains (it can now cache
      the identity of a domain's base type), and rewrite the argument handling
      logic in jsonfuncs.c's populate_record[set]_worker to reduce duplicative
      per-call lookups.
      
      I believe this is code-complete so far as the core and contrib code go.
      The PLs need varying amounts of work, which will be tackled in followup
      patches.
      
      Discussion: https://postgr.es/m/4206.1499798337@sss.pgh.pa.us
      37a795a6
    • Tom Lane's avatar
      Make setrefs.c match by ressortgroupref even for plain Vars. · 08f1e1f0
      Tom Lane authored
      Previously, we skipped using search_indexed_tlist_for_sortgroupref()
      if the tlist expression being sought in the child plan node was merely
      a Var.  This is purely an optimization, based on the theory that
      search_indexed_tlist_for_var() is faster, and one copy of a Var should
      be as good as another.  However, the GROUPING SETS patch broke the
      latter assumption: grouping columns containing the "same" Var can
      sometimes have different outputs, as shown in the test case added here.
      So do it the hard way whenever a ressortgroupref marking exists.
      
      (If this seems like a bottleneck, we could imagine building a tlist index
      data structure for ressortgroupref values, as we do for Vars.  But I'll
      let that idea go until there's some evidence it's worthwhile.)
      
      Back-patch to 9.6.  The problem also exists in 9.5 where GROUPING SETS
      came in, but this patch is insufficient to resolve the problem in 9.5:
      there is some obscure dependency on the upper-planner-pathification
      work that happened in 9.6.  Given that this is such a weird corner case,
      and no end users have complained about it, it doesn't seem worth the work
      to develop a fix for 9.5.
      
      Patch by me, per a report from Heikki Linnakangas.  (This does not fix
      Heikki's original complaint, just the follow-on one.)
      
      Discussion: https://postgr.es/m/aefc657e-edb2-64d5-6df1-a0828f6e9104@iki.fi
      08f1e1f0