1. 22 Jan, 2000 1 commit
  2. 17 Jan, 2000 1 commit
  3. 09 Jan, 2000 1 commit
  4. 13 Dec, 1999 1 commit
  5. 23 Nov, 1999 1 commit
  6. 15 Nov, 1999 2 commits
    • Tom Lane's avatar
      Clean up possible memory leakage in nodeSubplan · c8c3e07e
      Tom Lane authored
      c8c3e07e
    • Tom Lane's avatar
      Implement subselects in target lists. Also, relax requirement that · f68e11f3
      Tom Lane authored
      subselects can only appear on the righthand side of a binary operator.
      That's still true for quantified predicates like x = ANY (SELECT ...),
      but a subselect that delivers a single result can now appear anywhere
      in an expression.  This is implemented by changing EXPR_SUBLINK sublinks
      to represent just the (SELECT ...) expression, without any 'left hand
      side' or combining operator --- so they're now more like EXISTS_SUBLINK.
      To handle the case of '(x, y, z) = (SELECT ...)', I added a new sublink
      type MULTIEXPR_SUBLINK, which acts just like EXPR_SUBLINK used to.
      But the grammar will only generate one for a multiple-left-hand-side
      row expression.
      f68e11f3
  7. 01 Nov, 1999 1 commit
    • Tom Lane's avatar
      Eliminate some unbelievably cheesy code in _copyConst(). · c6f5f858
      Tom Lane authored
      Apparently, back in the dim reaches of prehistory, the parser couldn't
      be trusted to label Const nodes with the correct constbyval value ...
      and someone preferred to patch around this in copyObject rather than
      fix the problem at the source.  The problem is long gone, but the hack
      lingered on.  Until now.
      c6f5f858
  8. 07 Oct, 1999 1 commit
    • Tom Lane's avatar
      Fix planner and rewriter to follow SQL semantics for tables that are · 3eb1c822
      Tom Lane authored
      mentioned in FROM but not elsewhere in the query: such tables should be
      joined over anyway.  Aside from being more standards-compliant, this allows
      removal of some very ugly hacks for COUNT(*) processing.  Also, allow
      HAVING clause without aggregate functions, since SQL does.  Clean up
      CREATE RULE statement-list syntax the same way Bruce just fixed the
      main stmtmulti production.
      CAUTION: addition of a field to RangeTblEntry nodes breaks stored rules;
      you will have to initdb if you have any rules.
      3eb1c822
  9. 21 Aug, 1999 1 commit
    • Tom Lane's avatar
      Major revision of sort-node handling: push knowledge of query · db436adf
      Tom Lane authored
      sort order down into planner, instead of handling it only at the very top
      level of the planner.  This fixes many things.  An explicit sort is now
      avoided if there is a cheaper alternative (typically an indexscan) not
      only for ORDER BY, but also for the internal sort of GROUP BY.  It works
      even when there is no other reason (such as a WHERE condition) to consider
      the indexscan.  It works for indexes on functions.  It works for indexes
      on functions, backwards.  It's just so cool...
      
      CAUTION: I have changed the representation of SortClause nodes, therefore
      THIS UPDATE BREAKS STORED RULES.  You will need to initdb.
      db436adf
  10. 16 Aug, 1999 1 commit
    • Tom Lane's avatar
      Major planner/optimizer revision: get rid of PathOrder node type, · e6381966
      Tom Lane authored
      store all ordering information in pathkeys lists (which are now lists of
      lists of PathKeyItem nodes, not just lists of lists of vars).  This was
      a big win --- the code is smaller and IMHO more understandable than it
      was, even though it handles more cases.  I believe the node changes will
      not force an initdb for anyone; planner nodes don't show up in stored
      rules.
      e6381966
  11. 09 Aug, 1999 1 commit
    • Bruce Momjian's avatar
      > > Prevent sorting if result is already sorted · 158fd5f1
      Bruce Momjian authored
      > >
      > > was implemented by Jan Wieck.
      > > His work is for ascending order cases.
      > >
      > > Here is a patch to prevent sorting also in descending
      > > order cases.
      > > Because I had already changed _bt_first() to position
      > > backward correctly before v6.5,this patch would work.
      > >
      Hiroshi Inoue
      Inoue@tpf.co.jp
      158fd5f1
  12. 27 Jul, 1999 1 commit
    • Tom Lane's avatar
      First cut at doing LIKE/regex indexing optimization in · 9e7e29e6
      Tom Lane authored
      optimizer rather than parser.  This has many advantages, such as not
      getting fooled by chance uses of operator names ~ and ~~ (the operators
      are identified by OID now), and not creating useless comparison operations
      in contexts where the comparisons will not actually be used as indexquals.
      The new code also recognizes exact-match LIKE and regex patterns, and
      produces an = indexqual instead of >= and <=.
      
      This change does NOT fix the problem with non-ASCII locales: the code
      still doesn't know how to generate an upper bound indexqual for non-ASCII
      collation order.  But it's no worse than before, just the same deficiency
      in a different place...
      
      Also, dike out loc_restrictinfo fields in Plan nodes.  These were doing
      nothing useful in the absence of 'expensive functions' optimization,
      and they took a considerable amount of processing to fill in.
      9e7e29e6
  13. 25 Jul, 1999 1 commit
    • Tom Lane's avatar
      Remove 'restrictinfojoinid' field from RestrictInfo nodes. · 8ae29a1d
      Tom Lane authored
      The only place it was being used was as temporary storage in indxpath.c,
      and the logic was wrong: the same restrictinfo node could get chosen to
      carry the info for two different joins.  Right fix is to return a second
      list of unjoined-relids parallel to the list of clause groups.
      8ae29a1d
  14. 24 Jul, 1999 1 commit
    • Tom Lane's avatar
      Clean up messy clause-selectivity code in clausesel.c; repair bug · ac4913a0
      Tom Lane authored
      identified by Hiroshi (incorrect cost attributed to OR clauses
      after multiple passes through set_rest_selec()).  I think the code
      was trying to allow selectivities of OR subclauses to be passed in
      from outside, but noplace was actually passing any useful data, and
      set_rest_selec() was passing wrong data.
      
      Restructure representation of "indexqual" in IndexPath nodes so that
      it is the same as for indxqual in completed IndexScan nodes: namely,
      a toplevel list with an entry for each pass of the index scan, having
      sublists that are implicitly-ANDed index qual conditions for that pass.
      You don't want to know what the old representation was :-(
      
      Improve documentation of OR-clause indexscan functions.
      
      Remove useless 'notclause' field from RestrictInfo nodes.  (This might
      force an initdb for anyone who has stored rules containing RestrictInfos,
      but I do not think that RestrictInfo ever appears in completed plans.)
      ac4913a0
  15. 17 Jul, 1999 1 commit
  16. 16 Jul, 1999 1 commit
  17. 15 Jul, 1999 2 commits
  18. 25 May, 1999 2 commits
  19. 18 May, 1999 1 commit
  20. 12 May, 1999 1 commit
  21. 27 Apr, 1999 1 commit
  22. 19 Apr, 1999 1 commit
  23. 03 Mar, 1999 1 commit
    • Tom Lane's avatar
      Partial fix for copied-plan bugs reported by Hiroshi Inoue: · e0345e09
      Tom Lane authored
      _copyResult didn't copy subPlan structure completely.  _copyAgg is still
      busted, apparently because of changes from EXCEPT/INTERSECT patch
      (get_agg_tlist_references is no longer sufficient to find all aggregates).
      No time to look at that tonight, however.
      e0345e09
  24. 01 Mar, 1999 1 commit
    • Tom Lane's avatar
      Executor no longer cares about mergejoinop, mergerightorder, mergeleftorder, · b204d10c
      Tom Lane authored
      so remove them from MergeJoin node.  Hack together a partial
      solution for commuted mergejoin operators --- yesterday
      a mergejoin int4 = int8 would crash if the planner decided to
      commute it, today it works.  The planner's representation of
      mergejoins really needs a rewrite though.
      Also, further testing of mergejoin ops in opr_sanity regress test.
      b204d10c
  25. 22 Feb, 1999 1 commit
  26. 18 Feb, 1999 1 commit
  27. 15 Feb, 1999 2 commits
  28. 13 Feb, 1999 1 commit
  29. 12 Feb, 1999 2 commits
  30. 11 Feb, 1999 1 commit
  31. 10 Feb, 1999 1 commit
  32. 09 Feb, 1999 2 commits
  33. 08 Feb, 1999 1 commit
  34. 05 Feb, 1999 1 commit