1. 22 5月, 2018 3 次提交
  2. 21 5月, 2018 6 次提交
  3. 20 5月, 2018 3 次提交
  4. 19 5月, 2018 7 次提交
  5. 18 5月, 2018 7 次提交
  6. 17 5月, 2018 4 次提交
    • T
      Make numeric power() handle NaNs according to the modern POSIX spec. · d1fc750b
      Tom Lane 提交于
      In commit 6bdf1303, we ensured that power()/^ for float8 would honor
      the NaN behaviors specified by POSIX standards released in this century,
      ie NaN ^ 0 = 1 and 1 ^ NaN = 1.  However, numeric_power() was not
      touched and continued to follow the once-common behavior that every
      case involving NaN input produces NaN.  For consistency, let's switch
      the numeric behavior to the modern spec in the same release that ensures
      that behavior for float8.
      
      (Note that while 6bdf1303 was initially back-patched, we later undid
      that, concluding that any behavioral change should appear only in v11.)
      
      Discussion: https://postgr.es/m/10898.1526421338@sss.pgh.pa.us
      d1fc750b
    • B
      doc: PG 11 release notes adjustments · b2b82228
      Bruce Momjian 提交于
      b2b82228
    • T
      Detoast plpgsql variables if they might live across a transaction boundary. · 2efc9241
      Tom Lane 提交于
      Up to now, it's been safe for plpgsql to store TOAST pointers in its
      variables because the ActiveSnapshot for whatever query called the plpgsql
      function will surely protect such TOAST values from being vacuumed away,
      even if the owning table rows are committed dead.  With the introduction of
      procedures, that assumption is no longer good in "non atomic" executions
      of plpgsql code.  We adopt the slightly brute-force solution of detoasting
      all TOAST pointers at the time they are stored into variables, if we're in
      a non-atomic context, just in case the owning row goes away.
      
      Some care is needed to avoid long-term memory leaks, since plpgsql tends
      to run with CurrentMemoryContext pointing to its call-lifespan context,
      but we shouldn't assume that no memory is leaked by heap_tuple_fetch_attr.
      In plpgsql proper, we can do the detoasting work in the "eval_mcontext".
      
      Most of the code thrashing here is due to the need to add this capability
      to expandedrecord.c as well as plpgsql proper.  In expandedrecord.c,
      we can't assume that the caller's context is short-lived, so make use of
      the short-term sub-context that was already invented for checking domain
      constraints.  In view of this repurposing, it seems good to rename that
      variable and associated code from "domain_check_cxt" to "short_term_cxt".
      
      Peter Eisentraut and Tom Lane
      
      Discussion: https://postgr.es/m/5AC06865.9050005@anastigmatix.net
      2efc9241
    • T
      Fix misprocessing of equivalence classes involving record_eq(). · a11b3bd3
      Tom Lane 提交于
      canonicalize_ec_expression() is supposed to agree with coerce_type() as to
      whether a RelabelType should be inserted to make a subexpression be valid
      input for the operators of a given opclass.  However, it did the wrong
      thing with named-composite-type inputs to record_eq(): it put in a
      RelabelType to RECORDOID, which the parser doesn't.  In some cases this was
      harmless because all code paths involving a particular equivalence class
      did the same thing, but in other cases this would result in failing to
      recognize a composite-type expression as being a member of an equivalence
      class that it actually is a member of.  The most obvious bad effect was to
      fail to recognize that an index on a composite column could provide the
      sort order needed for a mergejoin on that column, as reported by Teodor
      Sigaev.  I think there might be other, subtler, cases that result in
      misoptimization.  It also seems possible that an unwanted RelabelType
      would sometimes get into an emitted plan --- but because record_eq and
      friends don't examine the declared type of their input expressions, that
      would not create any visible problems.
      
      To fix, just treat RECORDOID as if it were a polymorphic type, which in
      some sense it is.  We might want to consider formalizing that a bit more
      someday, but for the moment this seems to be the only place where an
      IsPolymorphicType() test ought to include RECORDOID as well.
      
      This has been broken for a long time, so back-patch to all supported
      branches.
      
      Discussion: https://postgr.es/m/a6b22369-e3bf-4d49-f59d-0c41d3551e81@sigaev.ru
      a11b3bd3
  7. 16 5月, 2018 7 次提交
  8. 15 5月, 2018 3 次提交