1. 26 11月, 2005 2 次提交
    • T
      Change seqscan logic so that we check visibility of all tuples on a page · 70f1482d
      Tom Lane 提交于
      when we first read the page, rather than checking them one at a time.
      This allows us to take and release the buffer content lock just once
      per page, instead of once per tuple.  Since it's a shared lock the
      contention penalty for holding the lock longer shouldn't be too bad.
      We can safely do this only when using an MVCC snapshot; else the
      assumption that visibility won't change over time is uncool.  Therefore
      there are now two code paths depending on the snapshot type.  I also
      made the same change in nodeBitmapHeapscan.c, where it can be done always
      because we only support MVCC snapshots for bitmap scans anyway.
      Also make some incidental cleanups in the APIs of these functions.
      Per a suggestion from Qingqing Zhou.
      70f1482d
    • T
      Teach planner and executor to handle ScalarArrayOpExpr as an indexable · 290166f9
      Tom Lane 提交于
      qualification when the underlying operator is indexable and useOr is true.
      That is, indexkey op ANY (ARRAY[...]) is effectively translated into an
      OR combination of one indexscan for each array element.  This only works
      for bitmap index scans, of course, since regular indexscans no longer
      support OR'ing of scans.  There are still some loose ends to clean up
      before changing 'x IN (list)' to translate as a ScalarArrayOpExpr;
      for instance predtest.c ought to be taught about it.  But this gets the
      basic functionality in place.
      290166f9
  2. 24 11月, 2005 1 次提交
    • T
      Get rid of ExecAssignResultTypeFromOuterPlan() and make all plan node types · 4dd2048a
      Tom Lane 提交于
      generate their output tuple descriptors from their target lists (ie, using
      ExecAssignResultTypeFromTL()).  We long ago fixed things so that all node
      types have minimally valid tlists, so there's no longer any good reason to
      have two different ways of doing it.  This change is needed to fix bug
      reported by Hayden James: the fix of 2005-11-03 to emit the correct column
      names after optimizing away a SubqueryScan node didn't work if the new
      top-level plan node used ExecAssignResultTypeFromOuterPlan to generate its
      tupdesc, since the next plan node down won't have the correct column labels.
      4dd2048a
  3. 23 11月, 2005 1 次提交
  4. 22 11月, 2005 1 次提交
    • A
      · 5b352d8e
      Andrew Dunstan 提交于
       DROP DATABASE IF EXISTS variant
      5b352d8e
  5. 21 11月, 2005 3 次提交
    • A
      Implement DROP OWNED and REASSIGN OWNED. These new commands facilitate the · cec3b0a9
      Alvaro Herrera 提交于
      process of dropping roles by dropping objects owned by them and privileges
      granted to them, or giving the owned objects to someone else, through the
      use of the data stored in the new pg_shdepend catalog.
      
      Some refactoring of the GRANT/REVOKE code was needed, as well as ALTER OWNER
      code.  Further cleanup of code duplication in the GRANT code seems necessary.
      
      Implemented by me after an idea from Tom Lane, who also provided various kind
      of implementation advice.
      
      Regression tests pass.  Some tests for the new functionality are also added,
      as well as rudimentary documentation.
      cec3b0a9
    • T
      Remove the t_datamcxt field of HeapTupleData. This was introduced for · dd218ae7
      Tom Lane 提交于
      the convenience of tuptoaster.c and is no longer needed, so may as well
      get rid of some small amount of overhead.
      dd218ae7
    • T
      Modify tuptoaster's API so that it does not try to modify the passed · 40314f2d
      Tom Lane 提交于
      tuple in-place, but instead passes back an all-new tuple structure if
      any changes are needed.  This is a much cleaner and more robust solution
      for the bug discovered by Alexey Beschiokov; accordingly, revert the
      quick hack I installed yesterday.
      With this change, HeapTupleData.t_datamcxt is no longer needed; will
      remove it in a separate commit in HEAD only.
      40314f2d
  6. 20 11月, 2005 1 次提交
    • A
      · daea4d8e
      Andrew Dunstan 提交于
      DROP objecttype IF EXISTS for the following objects:
        table view index sequence schema type domain conversion
      daea4d8e
  7. 18 11月, 2005 3 次提交
  8. 15 11月, 2005 2 次提交
    • T
      Restore the former RestrictInfo field valid_everywhere (but invert the flag · 1bdf124b
      Tom Lane 提交于
      sense and rename to "outerjoin_delayed" to more clearly reflect what it
      means).  I had decided that it was redundant in 8.1, but the folly of this
      is exposed by a bug report from Sebastian Böck.  The place where it's
      needed is to prevent orindxpath.c from cherry-picking arms of an outer-join
      OR clause to form a relation restriction that isn't actually legal to push
      down to the relation scan level.  There may be some legal cases that this
      forbids optimizing, but we'd need much closer analysis to determine it.
      1bdf124b
    • T
      Prevent ExecInsert() and ExecUpdate() from scribbling on the result tuple · 76ce39e3
      Tom Lane 提交于
      slot of the topmost plan node when a trigger returns a modified tuple.
      These appear to be the only places where a plan node's caller did not
      treat the result slot as read-only, which is an assumption that nodeUnique
      makes as of 8.1.  Fixes trigger-vs-DISTINCT bug reported by Frank van Vugt.
      76ce39e3
  9. 08 11月, 2005 1 次提交
  10. 07 11月, 2005 2 次提交
  11. 06 11月, 2005 2 次提交
  12. 05 11月, 2005 2 次提交
    • T
      Repair an error introduced by log_line_prefix patch: it is not acceptable · 48052de7
      Tom Lane 提交于
      to assume that the string pointer passed to set_ps_display is good forever.
      There's no need to anyway since ps_status.c itself saves the string, and
      we already had an API (get_ps_display) to return it.
      I believe this explains Jim Nasby's report of intermittent crashes in
      elog.c when %i format code is in use in log_line_prefix.
      While at it, repair a previously unnoticed problem: on some platforms such as
      Darwin, the string returned by get_ps_display was blank-padded to the maximum
      length, meaning that lock.c's attempt to append " waiting" to it never worked.
      48052de7
    • T
      Disregard superuserness when checking to see if a role GRANT would · c3d8de09
      Tom Lane 提交于
      create circularity of role memberships.  This is a minimum-impact fix
      for the problem reported by Florian Pflug.  I thought about removing
      the superuser_arg test from is_member_of_role() altogether, as it seems
      redundant for many of the callers --- but not all, and it's way too late
      in the 8.1 cycle to be making large changes.  Perhaps reconsider this
      later.
      c3d8de09
  13. 04 11月, 2005 1 次提交
  14. 27 10月, 2005 1 次提交
  15. 25 10月, 2005 1 次提交
  16. 23 10月, 2005 1 次提交
  17. 22 10月, 2005 1 次提交
  18. 21 10月, 2005 1 次提交
  19. 19 10月, 2005 2 次提交
  20. 18 10月, 2005 1 次提交
  21. 15 10月, 2005 2 次提交
    • B
      Standard pgindent run for 8.1. · 1dc34982
      Bruce Momjian 提交于
      1dc34982
    • T
      Fix syslog bug: if any messages are emitted to write_syslog before · abd3f43b
      Tom Lane 提交于
      the facility has been set, the facility gets set to LOCAL0 and cannot
      be changed later.  This seems reasonably plausible to happen, particularly
      at higher debug log levels, though I am not certain it explains Han Holl's
      recent report.  Easiest fix is to teach the code how to change the value
      on-the-fly, which is nicer anyway.  I made the settings PGC_SIGHUP to
      conform with log_destination.
      abd3f43b
  22. 13 10月, 2005 2 次提交
  23. 12 10月, 2005 2 次提交
  24. 11 10月, 2005 1 次提交
  25. 10 10月, 2005 1 次提交
    • T
      Fix (hopefully for the last time) problems with datetime values displaying · 313ed1ed
      Tom Lane 提交于
      like '23:59:60' because of fractional-second roundoff problems.  Trying
      to control this upstream of the actual display code was hopeless; the right
      way is to explicitly round fractional seconds in the display code and then
      refigure the results if the fraction rounds up to 1.  Per bug #1927.
      313ed1ed
  26. 08 10月, 2005 2 次提交