1. 02 Jan, 2007 1 commit
    • Bruce Momjian's avatar
      Fix float4/8 to handle Infinity and Nan consistently, e.g. Infinity is a · f9ac414c
      Bruce Momjian authored
      valid result from a computation if one of the input values was infinity.
      The previous code assumed an operation that returned infinity was an
      overflow.
      
      Handle underflow/overflow consistently, and add checks for aggregate
      overflow.
      
      Consistently prevent Inf/Nan from being cast to integer data types.
      
      Fix INT_MIN % -1 to prevent overflow.
      
      Update regression results for new error text.
      
      Per report from Roman Kononov.
      f9ac414c
  2. 31 Dec, 2006 1 commit
    • Tom Lane's avatar
      Found the problem with my operator-family changes: by fetching from · 0b56be83
      Tom Lane authored
      pg_opclass during LookupOpclassInfo(), I'd turned pg_opclass_oid_index
      into a critical system index.  However the problem could only manifest
      during a backend's first attempt to load opclass data, and then only
      if it had successfully loaded pg_internal.init and subsequently received
      a relcache flush; which made it impossible to reproduce in sequential
      tests and darn hard even in parallel tests.  Memo to self: when
      exercising cache flush scenarios, must disable LookupOpclassInfo's
      internal cache too.
      0b56be83
  3. 30 Dec, 2006 2 commits
  4. 29 Dec, 2006 3 commits
  5. 28 Dec, 2006 11 commits
  6. 27 Dec, 2006 7 commits
  7. 26 Dec, 2006 6 commits
    • Tom Lane's avatar
      Fix failure due to accessing an already-freed tuple descriptor in a plan · 0cbc5b1e
      Tom Lane authored
      involving HashAggregate over SubqueryScan (this is the known case, there
      may well be more).  The bug is only latent in releases before 8.2 since they
      didn't try to access tupletable slots' descriptors during ExecDropTupleTable.
      The least bogus fix seems to be to make subqueries share the parent query's
      memory context, so that tupdescs they create will have the same lifespan as
      those of the parent query.  There are comments in the code envisioning going
      even further by not having a separate child EState at all, but that will
      require rethinking executor access to range tables, which I don't want to
      tackle right now.  Per bug report from Jean-Pierre Pelletier.
      0cbc5b1e
    • Tom Lane's avatar
      Repair bug #2839: the various ExecReScan functions need to reset · 68996463
      Tom Lane authored
      ps_TupFromTlist in plan nodes that make use of it.  This was being done
      correctly in join nodes and Result nodes but not in any relation-scan nodes.
      Bug would lead to bogus results if a set-returning function appeared in the
      targetlist of a subquery that could be rescanned after partial execution,
      for example a subquery within EXISTS().  Bug has been around forever :-(
      ... surprising it wasn't reported before.
      68996463
    • Tom Lane's avatar
      Repair bug #2836: SPI_execute_plan returned zero if none of the querytrees · fccf99f0
      Tom Lane authored
      were marked canSetTag.  While it's certainly correct to return the result
      of the last one that is marked canSetTag, it's less clear what to do when
      none of them are.  Since plpgsql will complain if zero is returned, the
      8.2.0 behavior isn't good.  I've fixed it to restore the prior behavior of
      returning the physically last query's result code when there are no
      canSetTag queries.
      fccf99f0
    • Tom Lane's avatar
      4a836bad
    • Teodor Sigaev's avatar
      Fix memory reallocation condition · 49b64d34
      Teodor Sigaev authored
      49b64d34
    • Tatsuo Ishii's avatar
      Call srandom() instead of srand(). · 39def593
      Tatsuo Ishii authored
      pgbench calls random() later, so it should have called srandom().
      On most platforms except Windows srandom() is actually identical
      to srand(), so the bug only bites Windows users.
      per bug report from Akio Ishida.
      39def593
  8. 24 Dec, 2006 4 commits
    • Tom Lane's avatar
      Make HISTCONTROL=ignoredups work again (broken by misordering of · 506a9893
      Tom Lane authored
      operations during recent code refactoring).  Per bug #2840 from Ned Crigler.
      506a9893
    • Tom Lane's avatar
      Bring some order and sanity to error handling in the xml patch. · 57f1630c
      Tom Lane authored
      Use a TRY block instead of (inadequate) ad-hoc coding to ensure that
      libxml is cleaned up after a failure.  Report the intended SQLCODE
      instead of defaulting to XX000.  Avoid risking use of a dangling
      pointer by keeping the persistent error buffer in TopMemoryContext.
      Be less trusting that error messages don't contain %.
      
      This patch doesn't do anything about changing the way the messages
      are put together --- this is just about mechanism.
      57f1630c
    • Tom Lane's avatar
      Fix machine-dependent crash in sqlchar_to_unicode(). Get rid of · e9da20ab
      Tom Lane authored
      bletcherous and unsafe manipulation of global encoding setting.
      Clean up libxml reporting mechanism a bit (it still looks like a
      dangling-pointer crash waiting to happen, though, not to mention
      being far less than sane from a localization standpoint).
      e9da20ab
    • Tom Lane's avatar
      Code review for XML patch. Instill a bit of sanity in the location of · c957c0ba
      Tom Lane authored
      the XmlExpr code in various lists, use a representation that has some hope
      of reverse-listing correctly (though it's still a de-escaping function
      shy of correctness), generally try to make it look more like Postgres
      coding conventions.
      c957c0ba
  9. 23 Dec, 2006 5 commits