1. 18 6月, 2009 1 次提交
  2. 14 6月, 2009 1 次提交
    • T
      Change test tables in copy2 regression test to be temporary tables. · 5b2e5fed
      Tom Lane 提交于
      This prevents autovacuum from reclaiming free space in them and causing
      the test's output row order to change, which is causing intermittent
      bogus failure reports in the buildfarm.
      
      Backpatch to 8.3.  The issue exists further back, but since autovacuum was
      not on by default before 8.3, it's not a problem for buildfarm testing.
      5b2e5fed
  3. 12 6月, 2009 1 次提交
  4. 11 6月, 2009 3 次提交
  5. 10 6月, 2009 3 次提交
  6. 09 6月, 2009 1 次提交
  7. 06 6月, 2009 3 次提交
  8. 05 6月, 2009 1 次提交
  9. 02 6月, 2009 1 次提交
  10. 25 5月, 2009 1 次提交
    • T
      Fix LIKE's special-case code for % followed by _. I'm not entirely sure that · 6b4a3a77
      Tom Lane 提交于
      this case is worth a special code path, but a special code path that gets
      the boundary condition wrong is definitely no good.  Per bug #4821 from
      Andrew Gierth.
      
      In passing, clean up some minor code formatting issues (excess parentheses
      and blank lines in odd places).
      
      Back-patch to 8.3, where the bug was introduced.
      6b4a3a77
  11. 19 5月, 2009 1 次提交
  12. 13 5月, 2009 1 次提交
    • T
      Fix intratransaction memory leaks in xml_recv, xmlconcat, xmlroot, and · 9497c7a7
      Tom Lane 提交于
      xml_parse, all arising from the same sloppy usage of parse_xml_decl.
      The original coding had that function returning its output string
      parameters in the libxml context, which is long-lived, and all but one
      of its callers neglected to free the strings afterwards.  The easiest
      and most bulletproof fix is to return the strings in the local palloc
      context instead, since that's short-lived.  This was only costing a
      dozen or two bytes per function call, but that adds up fast if the
      function is called repeatedly ...
      
      Noted while poking at the more general problem of what to do with our
      libxml memory allocation hooks.  Back-patch to 8.3, which has the
      identical coding.
      9497c7a7
  13. 12 5月, 2009 1 次提交
    • T
      Partially revert my patch of 2008-11-12 that installed a limit on the number · dd60bca4
      Tom Lane 提交于
      of AND/OR clause branches that predtest.c would attempt to deal with.  As
      noted in bug #4721, that change disabled proof attempts for sizes of problems
      that people are actually expecting it to work for.  The original complaint
      it was trying to solve was O(N^2) behavior for long IN-lists, so let's try
      applying the limit to just ScalarArrayOpExprs rather than everything.
      Another case of "foolish consistency" I fear.
      
      Back-patch to 8.2, same as the previous patch was.
      dd60bca4
  14. 07 5月, 2009 1 次提交
    • H
      Request XLOG switch before writing checkpoint in pg_start_backup(). Otherwise · b6ecee27
      Heikki Linnakangas 提交于
      you can end up with an unrecoverable backup if you start a new base backup
      right after finishing archive recovery. In that scenario, the redo pointer of
      the checkpoint that pg_start_backup() writes points to the XLOG segment where
      the timeline-changing end-of-archive-recovery checkpoint is. The beginning
      of that segment contains pages with the old timeline ID, and we don't accept
      that in recovery unless we find a history file covering the old timeline ID.
      If you omit pg_xlog from the base backup and clear the archive directory
      before starting the backup, there will be no such history file available.
      
      The bug is present in all versions since PITR was introduced in 8.0, but I'm
      back-patching only back to 8.2. Earlier versions didn't have XLOG switch
      records, making this fix unfeasible. Given the lack of reports until now,
      it doesn't seem worthwhile to spend more effort to fix 8.0 and 8.1.
      
      Per report and suggestion by Mikael Krantz
      b6ecee27
  15. 05 5月, 2009 1 次提交
  16. 04 5月, 2009 2 次提交
  17. 03 5月, 2009 1 次提交
    • T
      Split the release notes into a separate file for each (active) major branch, · 252d2b1e
      Tom Lane 提交于
      as per my recent proposal.  release.sgml itself is now just a stub that should
      change rarely; ideally, only once per major release to add a new include line.
      Most editing work will occur in the release-N.N.sgml files.  To update a back
      branch for a minor release, just copy the appropriate release-N.N.sgml
      file(s) into the back branch.
      
      This commit doesn't change the end-product documentation at all, only the
      source layout.  However, it makes it easy to start omitting ancient information
      from newer branches' documentation, should we ever decide to do that.
      252d2b1e
  18. 02 5月, 2009 1 次提交
    • T
      When checking for datetime field overflow, we should allow a fractional-second · d4f9678c
      Tom Lane 提交于
      part that rounds up to exactly 1.0 second.  The previous coding rejected input
      like "00:12:57.9999999999999999999999999999", with the exact number of nines
      needed to cause failure varying depending on float-timestamp option and
      possibly on platform.  Obviously this should round up to the next integral
      second, if we don't have enough precision to distinguish the value from that.
      Per bug #4789 from Robert Kruus.
      
      In passing, fix a missed check for fractional seconds in one copy of the
      "is it greater than 24:00:00" code.
      
      Broken all the way back, so patch all the way back.
      d4f9678c
  19. 26 4月, 2009 1 次提交
    • T
      Fix the handling of sub-SELECTs appearing in the arguments of an outer-level · 8f61f0b8
      Tom Lane 提交于
      aggregate function.  By definition, such a sub-SELECT cannot reference any
      variables of query levels between itself and the aggregate's semantic level
      (else the aggregate would've been assigned to that lower level instead).
      So the correct, most efficient implementation is to treat the sub-SELECT as
      being a sub-select of that outer query level, not the level the aggregate
      syntactically appears in.  Not doing so also confuses the heck out of our
      parameter-passing logic, as illustrated in bug report from Daniel Grace.
      
      Fortunately, we were already copying the whole Aggref expression up to the
      outer query level, so all that's needed is to delay SS_process_sublinks
      processing of the sub-SELECT until control returns to the outer level.
      
      This has been broken since we introduced spec-compliant treatment of
      outer aggregates in 7.4; so patch all the way back.
      8f61f0b8
  20. 25 4月, 2009 1 次提交
  21. 20 4月, 2009 1 次提交
  22. 17 4月, 2009 1 次提交
    • T
      Fix planner to restore its previous level of intelligence about pushing · 57af05af
      Tom Lane 提交于
      constants through full joins, as in
      
      	select * from tenk1 a full join tenk1 b using (unique1)
      	where unique1 = 42;
      
      which should generate a fairly cheap plan where we apply the constraint
      unique1 = 42 in each relation scan.  This had been broken by my patch of
      2008-06-27, which is now reverted in favor of a more invasive but hopefully
      less incorrect approach.  That patch was meant to prevent incorrect extraction
      of OR'd indexclauses from OR conditions above an outer join.  To do that
      correctly we need more information than the outerjoin_delay flag can provide,
      so add a nullable_relids field to RestrictInfo that records exactly which
      relations are nulled by outer joins that are underneath a particular qual
      clause.  A side benefit is that we can make the test in create_or_index_quals
      more specific: it is now smart enough to extract an OR'd indexclause into the
      outer side of an outer join, even though it must not do so in the inner side.
      The old coding couldn't distinguish these cases so it could not do either.
      57af05af
  23. 16 4月, 2009 1 次提交
  24. 10 4月, 2009 1 次提交
  25. 08 4月, 2009 1 次提交
  26. 07 4月, 2009 1 次提交
  27. 06 4月, 2009 1 次提交
  28. 04 4月, 2009 2 次提交
    • T
      Rewrite interval_hash() so that the hashcodes are equal for values that · fd8589c1
      Tom Lane 提交于
      interval_eq() considers equal.  I'm not sure how that fundamental requirement
      escaped us through multiple revisions of this hash function, but there it is;
      it's been wrong since interval_hash was first written for PG 7.1.
      Per bug #4748 from Roman Kononov.
      
      Backpatch to all supported releases.
      
      This patch changes the contents of hash indexes for interval columns.  That's
      no particular problem for PG 8.4, since we've broken on-disk compatibility
      of hash indexes already; but it will require a migration warning note in
      the next minor releases of all existing branches: "if you have any hash
      indexes on columns of type interval, REINDEX them after updating".
      fd8589c1
    • T
      Use (unsigned char) cast in argument of pg_tolower(). Maybe it works on · f7730d0e
      Tom Lane 提交于
      Windows without that, but we shouldn't put bad examples where people might
      copy them.  Also, reformat slightly to improve the odds that pgindent
      won't go nuts on this.
      f7730d0e
  29. 03 4月, 2009 2 次提交
  30. 02 4月, 2009 2 次提交
    • T
      Fix GUC's reports of assign_hook failure to always include the parameter value · e7a4b979
      Tom Lane 提交于
      we failed to assign, even in "can't happen" cases.  Motivated by wondering
      what's going on in a recent trouble report where "failed to commit" did
      happen.
      e7a4b979
    • T
      plpgsql's exec_simple_cast_value() mistakenly supposed that it could bypass · 5dde1db4
      Tom Lane 提交于
      casting effort whenever the input value was NULL.  However this prevents
      application of not-null domain constraints in the cases that use this
      function, as illustrated in bug #4741.  Since this function isn't meant
      for use in performance-critical paths anyway, this certainly seems like
      another case of "premature optimization is the root of all evil".
      
      Back-patch as far as 8.2; older versions made no effort to enforce
      domain constraints here anyway.
      5dde1db4