1. 12 12月, 2002 1 次提交
    • T
      Phase 2 of read-only-plans project: restructure expression-tree nodes · a0bf885f
      Tom Lane 提交于
      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
  2. 06 12月, 2002 1 次提交
  3. 05 12月, 2002 1 次提交
    • T
      Phase 1 of read-only-plans project: cause executor state nodes to point · 1fd0c59e
      Tom Lane 提交于
      to plan nodes, not vice-versa.  All executor state nodes now inherit from
      struct PlanState.  Copying of plan trees has been simplified by not
      storing a list of SubPlans in Plan nodes (eliminating duplicate links).
      The executor still needs such a list, but it can build it during
      ExecutorStart since it has to scan the plan tree anyway.
      No initdb forced since no stored-on-disk structures changed, but you
      will need a full recompile because of node-numbering changes.
      1fd0c59e
  4. 02 12月, 2002 1 次提交
    • T
      Teach planner to expand sufficiently simple SQL-language functions · 8e3a87fb
      Tom Lane 提交于
      ('SELECT expression') inline, like macros, during the constant-folding
      phase of planning.  The actual expansion is not difficult, but checking
      that we're not changing the semantics of the call turns out to be more
      subtle than one might think; in particular must pay attention to
      permissions issues, strictness, and volatility.
      8e3a87fb
  5. 01 12月, 2002 1 次提交
  6. 30 11月, 2002 3 次提交
  7. 26 11月, 2002 2 次提交
  8. 25 11月, 2002 1 次提交
    • T
      Restructure planning of nestloop inner indexscans so that the set of usable · 04c8785c
      Tom Lane 提交于
      joinclauses is determined accurately for each join.  Formerly, the code only
      considered joinclauses that used all of the rels from the outer side of the
      join; thus for example
      	FROM (a CROSS JOIN b) JOIN c ON (c.f1 = a.x AND c.f2 = b.y)
      could not exploit a two-column index on c(f1,f2), since neither of the
      qual clauses would be in the joininfo list it looked in.  The new code does
      this correctly, and also is able to eliminate redundant clauses, thus fixing
      the problem noted 24-Oct-02 by Hans-Jürgen Schönig.
      04c8785c
  9. 21 11月, 2002 1 次提交
  10. 20 11月, 2002 1 次提交
  11. 15 11月, 2002 3 次提交
  12. 13 11月, 2002 1 次提交
  13. 11 11月, 2002 1 次提交
  14. 10 11月, 2002 1 次提交
  15. 07 11月, 2002 1 次提交
  16. 06 11月, 2002 1 次提交
    • T
      First phase of implementing hash-based grouping/aggregation. An AGG plan · f6dba10e
      Tom Lane 提交于
      node now does its own grouping of the input rows, and has no need for a
      preceding GROUP node in the plan pipeline.  This allows elimination of
      the misnamed tuplePerGroup option for GROUP, and actually saves more code
      in nodeGroup.c than it costs in nodeAgg.c, as well as being presumably
      faster.  Restructure the API of query_planner so that we do not commit to
      using a sorted or unsorted plan in query_planner; instead grouping_planner
      makes the decision.  (Right now it isn't any smarter than query_planner
      was, but that will change as soon as it has the option to select a hash-
      based aggregation step.)  Despite all the hackery, no initdb needed since
      only in-memory node types changed.
      f6dba10e
  17. 02 11月, 2002 1 次提交
  18. 19 10月, 2002 1 次提交
    • T
      Fix range-query estimation to not double-exclude NULLs, per gripe from · c0f7dcda
      Tom Lane 提交于
      Ray Ontko 28-June-02.  Also, fix prefix_selectivity for NAME lefthand
      variables (it was bogusly assuming binary compatibility), and adjust
      make_greater_string() to not call pg_mbcliplen() with invalid multibyte
      data (this last per bug report that I can't find at the moment, but it
      was in July '02).
      c0f7dcda
  19. 13 10月, 2002 1 次提交
  20. 25 9月, 2002 1 次提交
  21. 19 9月, 2002 1 次提交
    • T
      Extend pg_cast castimplicit column to a three-way value; this allows us · b26dfb95
      Tom Lane 提交于
      to be flexible about assignment casts without introducing ambiguity in
      operator/function resolution.  Introduce a well-defined promotion hierarchy
      for numeric datatypes (int2->int4->int8->numeric->float4->float8).
      Change make_const to initially label numeric literals as int4, int8, or
      numeric (never float8 anymore).
      Explicitly mark Func and RelabelType nodes to indicate whether they came
      from a function call, explicit cast, or implicit cast; use this to do
      reverse-listing more accurately and without so many heuristics.
      Explicit casts to char, varchar, bit, varbit will truncate or pad without
      raising an error (the pre-7.2 behavior), while assigning to a column without
      any explicit cast will still raise an error for wrong-length data like 7.3.
      This more nearly follows the SQL spec than 7.2 behavior (we should be
      reporting a 'completion condition' in the explicit-cast cases, but we have
      no mechanism for that, so just do silent truncation).
      Fix some problems with enforcement of typmod for array elements;
      it didn't work at all in 'UPDATE ... SET array[n] = foo', for example.
      Provide a generalized array_length_coerce() function to replace the
      specialized per-array-type functions that used to be needed (and were
      missing for NUMERIC as well as all the datetime types).
      Add missing conversions int8<->float4, text<->numeric, oid<->int8.
      initdb forced.
      b26dfb95
  22. 11 9月, 2002 1 次提交
    • T
      Tweak querytree-dependency-extraction code so that columns of tables · 6fdc44be
      Tom Lane 提交于
      that are explicitly JOINed are not considered dependencies unless they
      are actually used in the query: mere presence in the joinaliasvars
      list of a JOIN RTE doesn't count as being used.  The patch touches
      a number of files because I needed to generalize the API of
      query_tree_walker to support an additional flag bit, but the changes
      are otherwise quite small.
      6fdc44be
  23. 05 9月, 2002 2 次提交
  24. 02 9月, 2002 2 次提交
  25. 01 9月, 2002 1 次提交
    • T
      Code review for domain-constraints patch. Use a new ConstraintTest node · 845a6c3a
      Tom Lane 提交于
      type for runtime constraint checks, instead of misusing the parse-time
      Constraint node for the purpose.  Fix some damage introduced into type
      coercion logic; in particular ensure that a coerced expression tree will
      read out the correct result type when inspected (patch had broken some
      RelabelType cases).  Enforce domain NOT NULL constraints against columns
      that are omitted from an INSERT.
      845a6c3a
  26. 30 8月, 2002 1 次提交
  27. 29 8月, 2002 1 次提交
  28. 26 8月, 2002 1 次提交
  29. 11 8月, 2002 1 次提交
  30. 03 8月, 2002 1 次提交
    • T
      ALTER TABLE DROP COLUMN works. Patch by Christopher Kings-Lynne, · 38bb77a5
      Tom Lane 提交于
      code review by Tom Lane.  Remaining issues: functions that take or
      return tuple types are likely to break if one drops (or adds!)
      a column in the table defining the type.  Need to think about what
      to do here.
      
      Along the way: some code review for recent COPY changes; mark system
      columns attnotnull = true where appropriate, per discussion a month ago.
      38bb77a5
  31. 31 7月, 2002 1 次提交
  32. 25 7月, 2002 1 次提交
  33. 20 7月, 2002 1 次提交
    • B
      oid is needed, it is added at the end of the struct (after the null · b0f5086e
      Bruce Momjian 提交于
      bitmap, if present).
      
      Per Tom Lane's suggestion the information whether a tuple has an oid
      or not is carried in the tuple descriptor.  For debugging reasons
      tdhasoid is of type char, not bool.  There are predefined values for
      WITHOID, WITHOUTOID and UNDEFOID.
      
      This patch has been generated against a cvs snapshot from last week
      and I don't expect it to apply cleanly to current sources.  While I
      post it here for public review, I'm working on a new version against a
      current snapshot.  (There's been heavy activity recently; hope to
      catch up some day ...)
      
      This is a long patch;  if it is too hard to swallow, I can provide it
      in smaller pieces:
      
      Part 1:  Accessor macros
      Part 2:  tdhasoid in TupDesc
      Part 3:  Regression test
      Part 4:  Parameter withoid to heap_addheader
      Part 5:  Eliminate t_oid from HeapTupleHeader
      
      Part 2 is the most hairy part because of changes in the executor and
      even in the parser;  the other parts are straightforward.
      
      Up to part 4 the patched postmaster stays binary compatible to
      databases created with an unpatched version.  Part 5 is small (100
      lines) and finally breaks compatibility.
      
      Manfred Koizar
      b0f5086e