1. 11 May, 2004 1 commit
  2. 07 Apr, 2004 1 commit
  3. 13 Feb, 2004 1 commit
  4. 03 Feb, 2004 1 commit
    • Tom Lane's avatar
      Rename SortMem and VacuumMem to work_mem and maintenance_work_mem. · 391c3811
      Tom Lane authored
      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
  5. 18 Jan, 2004 1 commit
    • Tom Lane's avatar
      When testing whether a sub-plan can do projection, use a general-purpose · 6bdfde9a
      Tom Lane authored
      check instead of hardwiring assumptions that only certain plan node types
      can appear at the places where we are testing.  This was always a pretty
      fragile assumption, and it turns out to be broken in 7.4 for certain cases
      involving IN-subselect tests that need type coercion.
      Also, modify code that builds finished Plan tree so that node types that
      don't do projection always copy their input node's targetlist, rather than
      having the tlist passed in from the caller.  The old method makes it too
      easy to write broken code that thinks it can modify the tlist when it
      cannot.
      6bdfde9a
  6. 12 Jan, 2004 1 commit
  7. 28 Dec, 2003 1 commit
    • Tom Lane's avatar
      Clean up the usage of canonicalize_qual(): in particular, be consistent · c607bd69
      Tom Lane authored
      about whether it is applied before or after eval_const_expressions().
      I believe there were some corner cases where the system would fail to
      recognize that a partial index is applicable because of the previous
      inconsistency.  Store normal rather than 'implicit AND' representations
      of constraints and index predicates in the catalogs.
      initdb forced due to representation change of constraints/predicates.
      c607bd69
  8. 29 Nov, 2003 1 commit
    • PostgreSQL Daemon's avatar
      · 969685ad
      PostgreSQL Daemon authored
      $Header: -> $PostgreSQL Changes ...
      969685ad
  9. 25 Sep, 2003 1 commit
  10. 17 Aug, 2003 1 commit
    • Tom Lane's avatar
      Create a 'type cache' that keeps track of the data needed for any particular · ec646dbc
      Tom Lane authored
      datatype by array_eq and array_cmp; use this to solve problems with memory
      leaks in array indexing support.  The parser's equality_oper and ordering_oper
      routines also use the cache.  Change the operator search algorithms to look
      for appropriate btree or hash index opclasses, instead of assuming operators
      named '<' or '=' have the right semantics.  (ORDER BY ASC/DESC now also look
      at opclasses, instead of assuming '<' and '>' are the right things.)  Add
      several more index opclasses so that there is no regression in functionality
      for base datatypes.  initdb forced due to catalog additions.
      ec646dbc
  11. 04 Aug, 2003 2 commits
  12. 25 Jul, 2003 1 commit
  13. 03 Jul, 2003 1 commit
    • Tom Lane's avatar
      Do honest transformation and preprocessing of LIMIT/OFFSET clauses, · b89140a7
      Tom Lane authored
      instead of the former kluge whereby gram.y emitted already-transformed
      expressions.  This is needed so that Params appearing in these clauses
      actually work correctly.  I suppose some might claim that the side effect
      of 'SELECT ... LIMIT 2+2' working is a new feature, but I say this is
      a bug fix.
      b89140a7
  14. 16 Jun, 2003 1 commit
    • Tom Lane's avatar
      Allow GROUP BY, ORDER BY, DISTINCT targets to be unknown literals, · a4997254
      Tom Lane authored
      silently resolving them to type TEXT.  This is comparable to what we
      do when faced with UNKNOWN in CASE, UNION, and other contexts.  It gets
      rid of this and related annoyances:
      	select distinct f1, '' from int4_tbl;
      	ERROR:  Unable to identify an ordering operator '<' for type unknown
      This was discussed many moons ago, but no one got round to fixing it.
      a4997254
  15. 06 Jun, 2003 1 commit
    • Tom Lane's avatar
      Implement outer-level aggregates to conform to the SQL spec, with · e649796f
      Tom Lane authored
      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
  16. 06 May, 2003 1 commit
    • Tom Lane's avatar
      Implement feature of new FE/BE protocol whereby RowDescription identifies · 2cf57c8f
      Tom Lane authored
      the column by table OID and column number, if it's a simple column
      reference.  Along the way, get rid of reskey/reskeyop fields in Resdoms.
      Turns out that representation was not convenient for either the planner
      or the executor; we can make the planner deliver exactly what the
      executor wants with no more effort.
      initdb forced due to change in stored rule representation.
      2cf57c8f
  17. 13 Mar, 2003 1 commit
  18. 10 Mar, 2003 1 commit
    • Tom Lane's avatar
      Restructure parsetree representation of DECLARE CURSOR: now it's a · aa83bc04
      Tom Lane authored
      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
  19. 05 Mar, 2003 2 commits
  20. 15 Feb, 2003 2 commits
  21. 09 Feb, 2003 2 commits
  22. 04 Feb, 2003 1 commit
  23. 03 Feb, 2003 1 commit
    • Tom Lane's avatar
      Tweak planner and executor to avoid doing ExecProject() in table scan · 4cff59d8
      Tom Lane authored
      nodes where it's not really necessary.  In many cases where the scan node
      is not the topmost plan node (eg, joins, aggregation), it's possible to
      just return the table tuple directly instead of generating an intermediate
      projection tuple.  In preliminary testing, this reduced the CPU time
      needed for 'SELECT COUNT(*) FROM foo' by about 10%.
      4cff59d8
  24. 25 Jan, 2003 1 commit
    • Tom Lane's avatar
      Allow the planner to collapse explicit inner JOINs together, rather than · 9f5f2124
      Tom Lane authored
      necessarily following the JOIN syntax to develop the query plan.  The old
      behavior is still available by setting GUC variable JOIN_COLLAPSE_LIMIT
      to 1.  Also create a GUC variable FROM_COLLAPSE_LIMIT to control the
      similar decision about when to collapse sub-SELECT lists into their parent
      lists.  (This behavior existed already, but the limit was always
      GEQO_THRESHOLD/2; now it's separately adjustable.)
      9f5f2124
  25. 20 Jan, 2003 1 commit
    • Tom Lane's avatar
      IN clauses appearing at top level of WHERE can now be handled as joins. · bdfbfde1
      Tom Lane authored
      There are two implementation techniques: the executor understands a new
      JOIN_IN jointype, which emits at most one matching row per left-hand row,
      or the result of the IN's sub-select can be fed through a DISTINCT filter
      and then joined as an ordinary relation.
      Along the way, some minor code cleanup in the optimizer; notably, break
      out most of the jointree-rearrangement preprocessing in planner.c and
      put it in a new file prep/prepjointree.c.
      bdfbfde1
  26. 17 Jan, 2003 1 commit
    • Tom Lane's avatar
      Fix parse_agg.c to detect ungrouped Vars in sub-SELECTs; remove code · b19adc1a
      Tom Lane authored
      that used to do it in planner.  That was an ancient kluge that was
      never satisfactory; errors should be detected at parse time when possible.
      But at the time we didn't have the support mechanism (expression_tree_walker
      et al) to make it convenient to do in the parser.
      b19adc1a
  27. 15 Jan, 2003 1 commit
    • Tom Lane's avatar
      Allow merge and hash joins to occur on arbitrary expressions (anything not · de97072e
      Tom Lane authored
      containing a volatile function), rather than only on 'Var = Var' clauses
      as before.  This makes it practical to do flatten_join_alias_vars at the
      start of planning, which in turn eliminates a bunch of klugery inside the
      planner to deal with alias vars.  As a free side effect, we now detect
      implied equality of non-Var expressions; for example in
      	SELECT ... WHERE a.x = b.y and b.y = 42
      we will deduce a.x = 42 and use that as a restriction qual on a.  Also,
      we can remove the restriction introduced 12/5/02 to prevent pullup of
      subqueries whose targetlists contain sublinks.
      Still TODO: make statistical estimation routines in selfuncs.c and costsize.c
      smarter about expressions that are more complex than plain Vars.  The need
      for this is considerably greater now that we have to be able to estimate
      the suitability of merge and hash join techniques on such expressions.
      de97072e
  28. 13 Jan, 2003 2 commits
  29. 19 Dec, 2002 1 commit
  30. 14 Dec, 2002 1 commit
    • Tom Lane's avatar
      Clean up plantree representation of SubPlan-s --- SubLink does not appear · 2d8d6662
      Tom Lane authored
      in the planned representation of a subplan at all any more, only SubPlan.
      This means subselect.c doesn't scribble on its input anymore, which seems
      like a good thing; and there are no longer three different possible
      interpretations of a SubLink.  Simplify node naming and improve comments
      in primnodes.h.  No change to stored rules, though.
      2d8d6662
  31. 12 Dec, 2002 1 commit
    • Tom Lane's avatar
      Phase 2 of read-only-plans project: restructure expression-tree nodes · a0bf885f
      Tom Lane authored
      so that all executable expression nodes inherit from a common supertype
      Expr.  This is somewhat of an exercise in code purity rather than any
      real functional advance, but getting rid of the extra Oper or Func node
      formerly used in each operator or function call should provide at least
      a little space and speed improvement.
      initdb forced by changes in stored-rules representation.
      a0bf885f
  32. 05 Dec, 2002 1 commit
  33. 29 Nov, 2002 1 commit
  34. 26 Nov, 2002 1 commit
  35. 21 Nov, 2002 1 commit