1. 10 May, 2004 1 commit
    • Tom Lane's avatar
      Promote row expressions to full-fledged citizens of the expression syntax, · 2f63232d
      Tom Lane authored
      rather than allowing them only in a few special cases as before.  In
      particular you can now pass a ROW() construct to a function that accepts
      a rowtype parameter.  Internal generation of RowExprs fixes a number of
      corner cases that used to not work very well, such as referencing the
      whole-row result of a JOIN or subquery.  This represents a further step in
      the work I started a month or so back to make rowtype values into
      first-class citizens.
      2f63232d
  2. 29 Nov, 2003 1 commit
    • PostgreSQL Daemon's avatar
      · 55b11325
      PostgreSQL Daemon authored
      make sure the $Id tags are converted to $PostgreSQL as well ...
      55b11325
  3. 04 Aug, 2003 1 commit
  4. 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
  5. 08 Feb, 2003 1 commit
  6. 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
  7. 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
  8. 12 Dec, 2002 1 commit
    • Tom Lane's avatar
      Preliminary code review for domain CHECK constraints patch: add documentation, · b0422b21
      Tom Lane authored
      make VALUE a non-reserved word again, use less invasive method of passing
      ConstraintTestValue into transformExpr, fix problems with nested constraint
      testing, do correct thing with NULL result from a constraint expression,
      remove memory leak.  Domain checks still need much more work if we are going
      to allow ALTER DOMAIN, however.
      b0422b21
  9. 15 Nov, 2002 1 commit
  10. 20 Jun, 2002 1 commit
  11. 18 May, 2002 1 commit
    • Tom Lane's avatar
      Change set_plan_references and join_references to take an rtable List · 51fd22ab
      Tom Lane authored
      rather than a Query node; this allows set_plan_references to recurse
      into subplans correctly.  Fixes core dump on full outer joins in
      subplans.  Also, invoke preprocess_expression on function RTEs'
      function expressions.  This seems to fix the planner's problems with
      outer-level Vars in function RTEs.
      51fd22ab
  12. 28 Apr, 2002 1 commit
    • Tom Lane's avatar
      Second try at fixing join alias variables. Instead of attaching miscellaneous · 6c598869
      Tom Lane authored
      lists to join RTEs, attach a list of Vars and COALESCE expressions that will
      replace the join's alias variables during planning.  This simplifies
      flatten_join_alias_vars while still making it easy to fix up varno references
      when transforming the query tree.  Add regression test cases for interactions
      of subqueries with outer joins.
      6c598869
  13. 12 Mar, 2002 1 commit
    • Tom Lane's avatar
      Restructure representation of join alias variables. An explicit JOIN · 6eeb95f0
      Tom Lane authored
      now has an RTE of its own, and references to its outputs now are Vars
      referencing the JOIN RTE, rather than CASE-expressions.  This allows
      reverse-listing in ruleutils.c to use the correct alias easily, rather
      than painfully reverse-engineering the alias namespace as it used to do.
      Also, nested FULL JOINs work correctly, because the result of the inner
      joins are simple Vars that the planner can cope with.  This fixes a bug
      reported a couple times now, notably by Tatsuo on 18-Nov-01.  The alias
      Vars are expanded into COALESCE expressions where needed at the very end
      of planning, rather than during parsing.
      Also, beginnings of support for showing plan qualifier expressions in
      EXPLAIN.  There are probably still cases that need work.
      initdb forced due to change of stored-rule representation.
      6eeb95f0
  14. 05 Nov, 2001 1 commit
  15. 28 Oct, 2001 1 commit
  16. 25 Oct, 2001 1 commit
  17. 09 May, 2001 1 commit
  18. 18 Apr, 2001 1 commit
  19. 24 Jan, 2001 1 commit
  20. 26 Jan, 2000 1 commit
    • Bruce Momjian's avatar
      Add: · 5c25d602
      Bruce Momjian authored
        * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
      
      to all files copyright Regents of Berkeley.  Man, that's a lot of files.
      5c25d602
  21. 26 Aug, 1999 1 commit
  22. 22 Aug, 1999 1 commit
    • Tom Lane's avatar
      Further planner/optimizer cleanups. Move all set_tlist_references · 78114cd4
      Tom Lane authored
      and fix_opids processing to a single recursive pass over the plan tree
      executed at the very tail end of planning, rather than haphazardly here
      and there at different places.  Now that tlist Vars do not get modified
      until the very end, it's possible to get rid of the klugy var_equal and
      match_varid partial-matching routines, and just use plain equal()
      throughout the optimizer.  This is a step towards allowing merge and
      hash joins to be done on expressions instead of only Vars ...
      78114cd4
  23. 15 Jul, 1999 1 commit
  24. 13 Feb, 1999 1 commit
  25. 01 Sep, 1998 1 commit
  26. 26 Nov, 1997 1 commit
  27. 08 Sep, 1997 2 commits
  28. 07 Sep, 1997 1 commit
  29. 28 Aug, 1996 1 commit
  30. 09 Jul, 1996 1 commit