1. 27 Oct, 2008 9 commits
  2. 26 Oct, 2008 1 commit
  3. 25 Oct, 2008 2 commits
    • Tom Lane's avatar
      Be a little smarter about qual handling for semi-joins: a qual that mentions · aa0fb530
      Tom Lane authored
      only the outer side can be pushed down rather than having to be evaluated
      at the join.
      aa0fb530
    • Tom Lane's avatar
      Add a heuristic to transformAExprIn() to make it prefer expanding "x IN (list)" · ddbe8dca
      Tom Lane authored
      into an OR of equality comparisons, rather than x = ANY(ARRAY[...]), when there
      are Vars in the right-hand side.  This avoids a performance regression compared
      to pre-8.2 releases, in cases where the OR form can be optimized into scans
      of multiple indexes.  Limit the possible downside by preferring this form only
      when the list isn't very long (I set the cutoff at 32 elements, which is a
      bit arbitrary but in the right ballpark).  Per discussion with Jim Nasby.
      
      In passing, also make it try the OR form if it cannot select a common type
      for the array elements; we've seen a complaint or two about how the OR form
      worked for such cases and ARRAY doesn't.
      ddbe8dca
  4. 24 Oct, 2008 5 commits
  5. 23 Oct, 2008 7 commits
  6. 22 Oct, 2008 3 commits
    • Tom Lane's avatar
      Dept of better ideas: refrain from creating the planner's placeholder_list · 31468d05
      Tom Lane authored
      until vars are distributed to rels during query_planner() startup.  We don't
      really need it before that, and not building it early has some advantages.
      First, we don't need to put it through the various preprocessing steps, which
      saves some cycles and eliminates the need for a number of routines to support
      PlaceHolderInfo nodes at all.  Second, this means one less unused plan for any
      sub-SELECT appearing in a placeholder's expression, since we don't build
      placeholder_list until after sublink expansion is complete.
      31468d05
    • Teodor Sigaev's avatar
      Fix GiST's killing tuple: GISTScanOpaque->curpos wasn't · b9856b67
      Teodor Sigaev authored
      correctly set. As result, killtuple() marks as dead
      wrong tuple on page. Bug was introduced by me while fixing
      possible duplicates during GiST index scan.
      b9856b67
    • Peter Eisentraut's avatar
      SQL:2008 alternative syntax for LIMIT/OFFSET: · 361bfc35
      Peter Eisentraut authored
      OFFSET num {ROW|ROWS} FETCH {FIRST|NEXT} [num] {ROW|ROWS} ONLY
      361bfc35
  7. 21 Oct, 2008 4 commits
    • Tom Lane's avatar
      Add a concept of "placeholder" variables to the planner. These are variables · e6ae3b5d
      Tom Lane authored
      that represent some expression that we desire to compute below the top level
      of the plan, and then let that value "bubble up" as though it were a plain
      Var (ie, a column value).
      
      The immediate application is to allow sub-selects to be flattened even when
      they are below an outer join and have non-nullable output expressions.
      Formerly we couldn't flatten because such an expression wouldn't properly
      go to NULL when evaluated above the outer join.  Now, we wrap it in a
      PlaceHolderVar and arrange for the actual evaluation to occur below the outer
      join.  When the resulting Var bubbles up through the join, it will be set to
      NULL if necessary, yielding the correct results.  This fixes a planner
      limitation that's existed since 7.1.
      
      In future we might want to use this mechanism to re-introduce some form of
      Hellerstein's "expensive functions" optimization, ie place the evaluation of
      an expensive function at the most suitable point in the plan tree.
      e6ae3b5d
    • Peter Eisentraut's avatar
      Clean regression.out · 831abae5
      Peter Eisentraut authored
      831abae5
    • Peter Eisentraut's avatar
      Use format_type_be() instead of TypeNameToString() for some more user-facing · d1b02e76
      Peter Eisentraut authored
      error messages where the type existence is established.
      d1b02e76
    • Peter Eisentraut's avatar
      Allow SQL:2008 syntax ALTER TABLE ... ALTER COLUMN ... SET DATA TYPE · 1471e384
      Peter Eisentraut authored
      alongside our traditional syntax.
      1471e384
  8. 20 Oct, 2008 9 commits