1. 04 8月, 2003 1 次提交
  2. 01 8月, 2003 1 次提交
  3. 31 7月, 2003 1 次提交
  4. 29 7月, 2003 1 次提交
  5. 28 7月, 2003 1 次提交
  6. 22 7月, 2003 1 次提交
  7. 02 7月, 2003 1 次提交
  8. 01 7月, 2003 1 次提交
  9. 29 6月, 2003 1 次提交
    • T
      Support expressions of the form 'scalar op ANY (array)' and · bee21792
      Tom Lane 提交于
      'scalar op ALL (array)', where the operator is applied between the
      lefthand scalar and each element of the array.  The operator must
      yield boolean; the result of the construct is the OR or AND of the
      per-element results, respectively.
      
      Original coding by Joe Conway, after an idea of Peter's.  Rewritten
      by Tom to keep the implementation strictly separate from subqueries.
      bee21792
  10. 27 6月, 2003 1 次提交
    • T
      Create real array comparison functions (that use the element datatype's · b3c0551e
      Tom Lane 提交于
      comparison functions), replacing the highly bogus bitwise array_eq.  Create
      a btree index opclass for ANYARRAY --- it is now possible to create indexes
      on array columns.
      Arrange to cache the results of catalog lookups across multiple array
      operations, instead of repeating the lookups on every call.
      Add string_to_array and array_to_string functions.
      Remove singleton_array, array_accum, array_assign, and array_subscript
      functions, since these were for proof-of-concept and not intended to become
      supported functions.
      Minor adjustments to behavior in some corner cases with empty or
      zero-dimensional arrays.
      
      Joe Conway (with some editorializing by Tom Lane).
      b3c0551e
  11. 26 6月, 2003 1 次提交
  12. 25 6月, 2003 1 次提交
  13. 23 6月, 2003 1 次提交
    • T
      Revise hash join and hash aggregation code to use the same datatype- · bff0422b
      Tom Lane 提交于
      specific hash functions used by hash indexes, rather than the old
      not-datatype-aware ComputeHashFunc routine.  This makes it safe to do
      hash joining on several datatypes that previously couldn't use hashing.
      The sets of datatypes that are hash indexable and hash joinable are now
      exactly the same, whereas before each had some that weren't in the other.
      bff0422b
  14. 16 6月, 2003 1 次提交
  15. 13 6月, 2003 1 次提交
  16. 06 6月, 2003 1 次提交
    • T
      Implement outer-level aggregates to conform to the SQL spec, with · e649796f
      Tom Lane 提交于
      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
  17. 31 5月, 2003 1 次提交
  18. 29 5月, 2003 2 次提交
    • T
      Fix some planner performance problems with large WHERE clauses, by · 8a6ac83d
      Tom Lane 提交于
      introducing new 'FastList' list-construction subroutines to use in
      hot spots.  This avoids the O(N^2) behavior of repeated lappend's
      by keeping a tail pointer, while not changing behavior by reversing
      list order as the lcons() method would do.
      8a6ac83d
    • T
      Replace functional-index facility with expressional indexes. Any column · fc8d970c
      Tom Lane 提交于
      of an index can now be a computed expression instead of a simple variable.
      Restrictions on expressions are the same as for predicates (only immutable
      functions, no sub-selects).  This fixes problems recently introduced with
      inlining SQL functions, because the inlining transformation is applied to
      both expression trees so the planner can still match them up.  Along the
      way, improve efficiency of handling index predicates (both predicates and
      index expressions are now cached by the relcache) and fix 7.3 oversight
      that didn't record dependencies of predicate expressions.
      fc8d970c
  19. 28 5月, 2003 1 次提交
  20. 10 5月, 2003 1 次提交
  21. 09 5月, 2003 1 次提交
    • T
      Update 3.0 protocol support to match recent agreements about how to · c0a8c3ac
      Tom Lane 提交于
      handle multiple 'formats' for data I/O.  Restructure CommandDest and
      DestReceiver stuff one more time (it's finally starting to look a bit
      clean though).  Code now matches latest 3.0 protocol document as far
      as message formats go --- but there is no support for binary I/O yet.
      c0a8c3ac
  22. 07 5月, 2003 1 次提交
    • T
      Restructure command destination handling so that we pass around · 79913910
      Tom Lane 提交于
      DestReceiver pointers instead of just CommandDest values.  The DestReceiver
      is made at the point where the destination is selected, rather than
      deep inside the executor.  This cleans up the original kluge implementation
      of tstoreReceiver.c, and makes it easy to support retrieving results
      from utility statements inside portals.  Thus, you can now do fun things
      like Bind and Execute a FETCH or EXPLAIN command, and it'll all work
      as expected (e.g., you can Describe the portal, or use Execute's count
      parameter to suspend the output partway through).  Implementation involves
      stuffing the utility command's output into a Tuplestore, which would be
      kind of annoying for huge output sets, but should be quite acceptable
      for typical uses of utility commands.
      79913910
  23. 06 5月, 2003 2 次提交
    • T
      Implement feature of new FE/BE protocol whereby RowDescription identifies · 2cf57c8f
      Tom Lane 提交于
      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
    • T
      Ditch ExecGetTupType() in favor of the much simpler ExecGetResultType(), · 94a3c603
      Tom Lane 提交于
      which does the same thing.  Perhaps at one time there was a reason to
      allow plan nodes to store their result types in different places, but
      AFAICT that's been unnecessary for a good while.
      94a3c603
  24. 03 5月, 2003 1 次提交
    • T
      Portal and memory management infrastructure for extended query protocol. · de28dc9a
      Tom Lane 提交于
      Both plannable queries and utility commands are now always executed
      within Portals, which have been revamped so that they can handle the
      load (they used to be good only for single SELECT queries).  Restructure
      code to push command-completion-tag selection logic out of postgres.c,
      so that it won't have to be duplicated between simple and extended queries.
      initdb forced due to addition of a field to Query nodes.
      de28dc9a
  25. 30 4月, 2003 1 次提交
    • T
      Infrastructure for deducing Param types from context, in the same way · aa282d44
      Tom Lane 提交于
      that the types of untyped string-literal constants are deduced (ie,
      when coerce_type is applied to 'em, that's what the type must be).
      Remove the ancient hack of storing the input Param-types array as a
      global variable, and put the info into ParseState instead.  This touches
      a lot of files because of adjustment of routine parameter lists, but
      it's really not a large patch.  Note: PREPARE statement still insists on
      exact specification of parameter types, but that could easily be relaxed
      now, if we wanted to do so.
      aa282d44
  26. 29 4月, 2003 1 次提交
  27. 28 4月, 2003 1 次提交
    • T
      Put back encoding-conversion step in processing of incoming queries; · 982430f8
      Tom Lane 提交于
      I had inadvertently omitted it while rearranging things to support
      length-counted incoming messages.  Also, change the parser's API back
      to accepting a 'char *' query string instead of 'StringInfo', as the
      latter wasn't buying us anything except overhead.  (I think when I put
      it in I had some notion of making the parser API 8-bit-clean, but
      seeing that flex depends on null-terminated input, that's not really
      ever gonna happen.)
      982430f8
  28. 25 4月, 2003 1 次提交
    • T
      Infrastructure for upgraded error reporting mechanism. elog.c is · f690920a
      Tom Lane 提交于
      rewritten and the protocol is changed, but most elog calls are still
      elog calls.  Also, we need to contemplate mechanisms for controlling
      all this functionality --- eg, how much stuff should appear in the
      postmaster log?  And what API should libpq expose for it?
      f690920a
  29. 09 4月, 2003 1 次提交
  30. 28 3月, 2003 2 次提交
    • B
      Add new files. · 4b0b8dad
      Bruce Momjian 提交于
      4b0b8dad
    • B
      This patch implements holdable cursors, following the proposal · 54f7338f
      Bruce Momjian 提交于
      (materialization into a tuple store) discussed on pgsql-hackers earlier.
      I've updated the documentation and the regression tests.
      
      Notes on the implementation:
      
      - I needed to change the tuple store API slightly -- it assumes that it
      won't be used to hold data across transaction boundaries, so the temp
      files that it uses for on-disk storage are automatically reclaimed at
      end-of-transaction. I added a flag to tuplestore_begin_heap() to control
      this behavior. Is changing the tuple store API in this fashion OK?
      
      - in order to store executor results in a tuple store, I added a new
      CommandDest. This works well for the most part, with one exception: the
      current DestFunction API doesn't provide enough information to allow the
      Executor to store results into an arbitrary tuple store (where the
      particular tuple store to use is chosen by the call site of
      ExecutorRun). To workaround this, I've temporarily hacked up a solution
      that works, but is not ideal: since the receiveTuple DestFunction is
      passed the portal name, we can use that to lookup the Portal data
      structure for the cursor and then use that to get at the tuple store the
      Portal is using. This unnecessarily ties the Portal code with the
      tupleReceiver code, but it works...
      
      The proper fix for this is probably to change the DestFunction API --
      Tom suggested passing the full QueryDesc to the receiveTuple function.
      In that case, callers of ExecutorRun could "subclass" QueryDesc to add
      any additional fields that their particular CommandDest needed to get
      access to. This approach would work, but I'd like to think about it for
      a little bit longer before deciding which route to go. In the mean time,
      the code works fine, so I don't think a fix is urgent.
      
      - (semi-related) I added a NO SCROLL keyword to DECLARE CURSOR, and
      adjusted the behavior of SCROLL in accordance with the discussion on
      -hackers.
      
      - (unrelated) Cleaned up some SGML markup in sql.sgml, copy.sgml
      
      Neil Conway
      54f7338f
  31. 27 3月, 2003 1 次提交
  32. 20 3月, 2003 1 次提交
  33. 12 3月, 2003 1 次提交
  34. 10 3月, 2003 1 次提交
    • T
      Restructure parsetree representation of DECLARE CURSOR: now it's a · aa83bc04
      Tom Lane 提交于
      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
  35. 09 3月, 2003 1 次提交
    • T
      Revise tuplestore and nodeMaterial so that we don't have to read the · aa60eecc
      Tom Lane 提交于
      entire contents of the subplan into the tuplestore before we can return
      any tuples.  Instead, the tuplestore holds what we've already read, and
      we fetch additional rows from the subplan as needed.  Random access to
      the previously-read rows works with the tuplestore, and doesn't affect
      the state of the partially-read subplan.  This is a step towards fixing
      the problems with cursors over complex queries --- we don't want to
      stick in Materialize nodes if they'll prevent quick startup for a cursor.
      aa60eecc
  36. 16 2月, 2003 1 次提交
  37. 15 2月, 2003 1 次提交