1. 29 6月, 2006 1 次提交
  2. 03 5月, 2006 1 次提交
    • T
      Fix calculation of plan node extParams to account for the possibility that one · f4923880
      Tom Lane 提交于
      initPlan sets a parameter for another.  This could not (I think) happen before
      8.1, but it's possible now because the initPlans generated by MIN/MAX
      optimization might themselves use initPlans.  We attach those initPlans as
      siblings of the MIN/MAX ones, not children, to avoid duplicate computation
      when multiple MIN/MAX aggregates are present; so this leads to the case of an
      initPlan needing the result of a sibling initPlan, which is not possible with
      ordinary query nesting.  Hadn't been noticed because in most contexts having
      too much stuff listed in extParam is fairly harmless.  Fixes "plan should not
      reference subplan's variable" bug reported by Catalin Pitis.
      f4923880
  3. 29 4月, 2006 1 次提交
    • T
      Remove the restriction originally coded into optimize_minmax_aggregates() that · 53ee9f52
      Tom Lane 提交于
      MIN/MAX not be converted to use an index if the query WHERE clause contains
      any volatile functions or subplans.
      
      I had originally feared that the conversion might alter the behavior of such a
      query with respect to a volatile function.  Well, so it might, but only in the
      sense that the function would get evaluated at a subset of the table rows
      rather than all of them --- and we have never made any such guarantee anyway.
      (For instance, we don't refuse to use an index for an ordinary non-aggregate
      query when one of the non-indexable filter conditions contains a volatile
      function.)
      
      The prohibition against subplans was because of worry that that case wasn't
      adequately tested, which it wasn't, but it turns out to be possible to make
      8.1 fail anyway:
      
      regression=# select o.ten, (select max(unique2) from tenk1 i where ten = o.ten
      or ten = (select f1 from int4_tbl limit 1)) from tenk1 o;
      ERROR:  direct correlated subquery unsupported as initplan
      
      This is due to bogus code in SS_make_initplan_from_plan (it's an initplan,
      ergo it can't have any parParams).  Having fixed that, we might as well allow
      subplans as well as initplans.
      53ee9f52
  4. 22 4月, 2006 1 次提交
  5. 05 3月, 2006 1 次提交
  6. 28 12月, 2005 1 次提交
    • T
      Implement SQL-compliant treatment of row comparisons for < <= > >= cases · 6e077097
      Tom Lane 提交于
      (previously we only did = and <> correctly).  Also, allow row comparisons
      with any operators that are in btree opclasses, not only those with these
      specific names.  This gets rid of a whole lot of indefensible assumptions
      about the behavior of particular operators based on their names ... though
      it's still true that IN and NOT IN expand to "= ANY".  The patch adds a
      RowCompareExpr expression node type, and makes some changes in the
      representation of ANY/ALL/ROWCOMPARE SubLinks so that they can share code
      with RowCompareExpr.
      
      I have not yet done anything about making RowCompareExpr an indexable
      operator, but will look at that soon.
      
      initdb forced due to changes in stored rules.
      6e077097
  7. 27 11月, 2005 1 次提交
    • T
      Teach tid-scan code to make use of "ctid = ANY (array)" clauses, so that · da27c0a1
      Tom Lane 提交于
      "ctid IN (list)" will still work after we convert IN to ScalarArrayOpExpr.
      Make some minor efficiency improvements while at it, such as ensuring that
      multiple TIDs are fetched in physical heap order.  And fix EXPLAIN so that
      it shows what's really going on for a TID scan.
      da27c0a1
  8. 23 11月, 2005 1 次提交
  9. 15 10月, 2005 1 次提交
  10. 06 6月, 2005 1 次提交
    • T
      Remove planner's private fields from Query struct, and put them into · 9ab4d981
      Tom Lane 提交于
      a new PlannerInfo struct, which is passed around instead of the bare
      Query in all the planning code.  This commit is essentially just a
      code-beautification exercise, but it does open the door to making
      larger changes to the planner data structures without having to muck
      with the widely-known Query struct.
      9ab4d981
  11. 25 4月, 2005 1 次提交
    • T
      Remove support for OR'd indexscans internal to a single IndexScan plan · 5b051852
      Tom Lane 提交于
      node, as this behavior is now better done as a bitmap OR indexscan.
      This allows considerable simplification in nodeIndexscan.c itself as
      well as several planner modules concerned with indexscan plan generation.
      Also we can improve the sharing of code between regular and bitmap
      indexscans, since they are now working with nigh-identical Plan nodes.
      5b051852
  12. 20 4月, 2005 1 次提交
    • T
      Create executor and planner-backend support for decoupled heap and index · 4a8c5d03
      Tom Lane 提交于
      scans, using in-memory tuple ID bitmaps as the intermediary.  The planner
      frontend (path creation and cost estimation) is not there yet, so none
      of this code can be executed.  I have tested it using some hacked planner
      code that is far too ugly to see the light of day, however.  Committing
      now so that the bulk of the infrastructure changes go in before the tree
      drifts under me.
      4a8c5d03
  13. 12 4月, 2005 1 次提交
  14. 07 4月, 2005 1 次提交
    • T
      Merge Resdom nodes into TargetEntry nodes to simplify code and save a · ad161bcc
      Tom Lane 提交于
      few palloc's.  I also chose to eliminate the restype and restypmod fields
      entirely, since they are redundant with information stored in the node's
      contained expression; re-examining the expression at need seems simpler
      and more reliable than trying to keep restype/restypmod up to date.
      
      initdb forced due to change in contents of stored rules.
      ad161bcc
  15. 01 1月, 2005 1 次提交
    • P
      · 2ff50159
      PostgreSQL Daemon 提交于
      Tag appropriate files for rc3
      
      Also performed an initial run through of upgrading our Copyright date to
      extend to 2005 ... first run here was very simple ... change everything
      where: grep 1996-2004 && the word 'Copyright' ... scanned through the
      generated list with 'less' first, and after, to make sure that I only
      picked up the right entries ...
      2ff50159
  16. 29 8月, 2004 2 次提交
  17. 31 5月, 2004 1 次提交
  18. 26 5月, 2004 1 次提交
    • N
      Reimplement the linked list data structure used throughout the backend. · d0b4399d
      Neil Conway 提交于
      In the past, we used a 'Lispy' linked list implementation: a "list" was
      merely a pointer to the head node of the list. The problem with that
      design is that it makes lappend() and length() linear time. This patch
      fixes that problem (and others) by maintaining a count of the list
      length and a pointer to the tail node along with each head node pointer.
      A "list" is now a pointer to a structure containing some meta-data
      about the list; the head and tail pointers in that structure refer
      to ListCell structures that maintain the actual linked list of nodes.
      
      The function names of the list API have also been changed to, I hope,
      be more logically consistent. By default, the old function names are
      still available; they will be disabled-by-default once the rest of
      the tree has been updated to use the new API names.
      d0b4399d
  19. 11 5月, 2004 1 次提交
  20. 04 2月, 2004 1 次提交
    • T
      Rename SortMem and VacuumMem to work_mem and maintenance_work_mem. · 391c3811
      Tom Lane 提交于
      Make btree index creation and initial validation of foreign-key constraints
      use maintenance_work_mem rather than work_mem as their memory limit.
      Add some code to guc.c to allow these variables to be referenced by their
      old names in SHOW and SET commands, for backwards compatibility.
      391c3811
  21. 13 1月, 2004 1 次提交
  22. 30 11月, 2003 1 次提交
    • P
      · 969685ad
      PostgreSQL Daemon 提交于
      $Header: -> $PostgreSQL Changes ...
      969685ad
  23. 26 11月, 2003 2 次提交
  24. 19 10月, 2003 1 次提交
  25. 09 8月, 2003 1 次提交
  26. 04 8月, 2003 2 次提交
  27. 25 7月, 2003 1 次提交
  28. 26 6月, 2003 1 次提交
  29. 25 6月, 2003 1 次提交
  30. 06 6月, 2003 1 次提交
    • T
      Implement outer-level aggregates to conform to the SQL spec, with · e649796f
      Tom Lane 提交于
      extensions to support our historical behavior.  An aggregate belongs
      to the closest query level of any of the variables in its argument,
      or the current query level if there are no variables (e.g., COUNT(*)).
      The implementation involves adding an agglevelsup field to Aggref,
      and treating outer aggregates like outer variables at planning time.
      e649796f
  31. 30 4月, 2003 1 次提交
    • T
      Infrastructure for deducing Param types from context, in the same way · aa282d44
      Tom Lane 提交于
      that the types of untyped string-literal constants are deduced (ie,
      when coerce_type is applied to 'em, that's what the type must be).
      Remove the ancient hack of storing the input Param-types array as a
      global variable, and put the info into ParseState instead.  This touches
      a lot of files because of adjustment of routine parameter lists, but
      it's really not a large patch.  Note: PREPARE statement still insists on
      exact specification of parameter types, but that could easily be relaxed
      now, if we wanted to do so.
      aa282d44
  32. 09 4月, 2003 1 次提交
  33. 10 3月, 2003 1 次提交
    • T
      Restructure parsetree representation of DECLARE CURSOR: now it's a · aa83bc04
      Tom Lane 提交于
      utility statement (DeclareCursorStmt) with a SELECT query dangling from
      it, rather than a SELECT query with a few unusual fields in it.  Add
      code to determine whether a planned query can safely be run backwards.
      If DECLARE CURSOR specifies SCROLL, ensure that the plan can be run
      backwards by adding a Materialize plan node if it can't.  Without SCROLL,
      you get an error if you try to fetch backwards from a cursor that can't
      handle it.  (There is still some discussion about what the exact
      behavior should be, but this is necessary infrastructure in any case.)
      Along the way, make EXPLAIN DECLARE CURSOR work.
      aa83bc04
  34. 09 2月, 2003 3 次提交
  35. 29 1月, 2003 1 次提交