1. 01 1月, 2005 1 次提交
    • P
      · 2ff50159
      PostgreSQL Daemon 提交于
      Tag appropriate files for rc3
      
      Also performed an initial run through of upgrading our Copyright date to
      extend to 2005 ... first run here was very simple ... change everything
      where: grep 1996-2004 && the word 'Copyright' ... scanned through the
      generated list with 'less' first, and after, to make sure that I only
      picked up the right entries ...
      2ff50159
  2. 12 12月, 2004 1 次提交
    • T
      Instead of supposing (wrongly, in the general case) that the rowtype · 12b1b5d8
      Tom Lane 提交于
      of an inheritance child table is binary-compatible with the rowtype of
      its parent, invent an expression node type that does the conversion
      correctly.  Fixes the new bug exhibited by Kris Shannon as well as a
      lot of old bugs that would only show up when using multiple inheritance
      or after altering the parent table.
      12b1b5d8
  3. 17 11月, 2004 1 次提交
    • T
      Rethink plpgsql's way of handling SPI execution during an exception block. · 7efa8411
      Tom Lane 提交于
      We don't really want to start a new SPI connection, just keep using the old
      one; otherwise we have memory management problems as illustrated by
      John Kennedy's bug report of today.  This requires a bit of a hack to
      ensure the SPI stack state is properly restored, but then again what we
      were doing before was a hack too, strictly speaking.  Add a regression
      test to cover this case.
      7efa8411
  4. 25 10月, 2004 1 次提交
  5. 21 10月, 2004 1 次提交
  6. 13 10月, 2004 2 次提交
    • N
      More minor cosmetic improvements: · 7069dbcc
      Neil Conway 提交于
      - remove another senseless "extern" keyword that was applied to a
      function definition
      - change a foo more function signatures from "some_type foo()" to
      "some_type foo(void)"
      - rewrite another K&R style function definition
      - make the type of the "action" function pointer in the KeyWord struct
      in src/backend/utils/adt/formatting.c more precise
      7069dbcc
    • P
      Message style revisions · 0fd37839
      Peter Eisentraut 提交于
      0fd37839
  7. 11 10月, 2004 1 次提交
  8. 08 10月, 2004 1 次提交
    • T
      Fix problems with SQL functions returning rowtypes that have dropped · a8487e15
      Tom Lane 提交于
      columns.  The returned tuple needs to have appropriate NULL columns
      inserted so that it actually matches the declared rowtype.  It seemed
      convenient to use a JunkFilter for this, so I made some cleanups and
      simplifications in the JunkFilter code to allow it to support this
      additional functionality.  (That in turn exposed a latent bug in
      nodeAppend.c, which is that it was returning a tuple slot whose
      descriptor didn't match its data.)  Also, move check_sql_fn_retval
      out of pg_proc.c and into functions.c, where it seems to more naturally
      belong.
      a8487e15
  9. 01 10月, 2004 1 次提交
  10. 24 9月, 2004 1 次提交
  11. 23 9月, 2004 2 次提交
  12. 18 9月, 2004 1 次提交
  13. 17 9月, 2004 2 次提交
    • T
      Add some marginal tweaks to eliminate memory leakages associated with · 257cccbe
      Tom Lane 提交于
      subtransactions.  Trivial subxacts (such as a plpgsql exception block
      containing no database access) now demonstrably leak zero bytes.
      257cccbe
    • T
      Restructure subtransaction handling to reduce resource consumption, · 8f9f1986
      Tom Lane 提交于
      as per recent discussions.  Invent SubTransactionIds that are managed like
      CommandIds (ie, counter is reset at start of each top transaction), and
      use these instead of TransactionIds to keep track of subtransaction status
      in those modules that need it.  This means that a subtransaction does not
      need an XID unless it actually inserts/modifies rows in the database.
      Accordingly, don't assign it an XID nor take a lock on the XID until it
      tries to do that.  This saves a lot of overhead for subtransactions that
      are only used for error recovery (eg plpgsql exceptions).  Also, arrange
      to release a subtransaction's XID lock as soon as the subtransaction
      exits, in both the commit and abort cases.  This avoids holding many
      unique locks after a long series of subtransactions.  The price is some
      additional overhead in XactLockTableWait, but that seems acceptable.
      Finally, restructure the state machine in xact.c to have a more orthogonal
      set of states for subtransactions.
      8f9f1986
  14. 14 9月, 2004 1 次提交
    • T
      Redesign query-snapshot timing so that volatile functions in READ COMMITTED · b2c40712
      Tom Lane 提交于
      mode see a fresh snapshot for each command in the function, rather than
      using the latest interactive command's snapshot.  Also, suppress fresh
      snapshots as well as CommandCounterIncrement inside STABLE and IMMUTABLE
      functions, instead using the snapshot taken for the most closely nested
      regular query.  (This behavior is only sane for read-only functions, so
      the patch also enforces that such functions contain only SELECT commands.)
      As per my proposal of 6-Sep-2004; I note that I floated essentially the
      same proposal on 19-Jun-2002, but that discussion tailed off without any
      action.  Since 8.0 seems like the right place to be taking possibly
      nontrivial backwards compatibility hits, let's get it done now.
      b2c40712
  15. 12 9月, 2004 1 次提交
    • T
      Renumber SnapshotNow and the other special snapshot codes so that · 493f7260
      Tom Lane 提交于
      ((Snapshot) NULL) can no longer be confused with a valid snapshot,
      as per my recent suggestion.  Define a macro InvalidSnapshot for 0.
      Use InvalidSnapshot instead of SnapshotAny as the do-nothing special
      case for heap_update and heap_delete crosschecks; this seems a little
      cleaner even though the behavior is really the same.
      493f7260
  16. 11 9月, 2004 1 次提交
    • T
      Fire non-deferred AFTER triggers immediately upon query completion, · b339d1ff
      Tom Lane 提交于
      rather than when returning to the idle loop.  This makes no particular
      difference for interactively-issued queries, but it makes a big difference
      for queries issued within functions: trigger execution now occurs before
      the calling function is allowed to proceed.  This responds to numerous
      complaints about nonintuitive behavior of foreign key checking, such as
      http://archives.postgresql.org/pgsql-bugs/2004-09/msg00020.php, and
      appears to be required by the SQL99 spec.
      Also take the opportunity to simplify the data structures used for the
      pending-trigger list, rename them for more clarity, and squeeze out a
      bit of space.
      b339d1ff
  17. 07 9月, 2004 1 次提交
  18. 29 8月, 2004 2 次提交
  19. 18 8月, 2004 1 次提交
    • T
      Standardize on the assumption that the arguments of a RowExpr correspond · fcaad7e2
      Tom Lane 提交于
      to the physical layout of the rowtype, ie, there are dummy arguments
      corresponding to any dropped columns in the rowtype.  We formerly had a
      couple of places that did it this way and several others that did not.
      Fixes Gaetano Mendola's "cache lookup failed for type 0" bug of 5-Aug.
      fcaad7e2
  20. 02 8月, 2004 1 次提交
    • T
      Allow DECLARE CURSOR to take parameters from the portal in which it is · f622c540
      Tom Lane 提交于
      executed.  Previously, the DECLARE would succeed but subsequent FETCHes
      would fail since the parameter values supplied to DECLARE were not
      propagated to the portal created for the cursor.
      In support of this, add type Oids to ParamListInfo entries, which seems
      like a good idea anyway since code that extracts a value can double-check
      that it got the type of value it was expecting.
      Oliver Jowett, with minor editorialization by Tom Lane.
      f622c540
  21. 01 8月, 2004 1 次提交
  22. 27 7月, 2004 1 次提交
  23. 15 7月, 2004 1 次提交
  24. 11 7月, 2004 1 次提交
  25. 02 7月, 2004 1 次提交
  26. 01 7月, 2004 1 次提交
  27. 18 6月, 2004 1 次提交
    • T
      Tablespaces. Alternate database locations are dead, long live tablespaces. · 2467394e
      Tom Lane 提交于
      There are various things left to do: contrib dbsize and oid2name modules
      need work, and so does the documentation.  Also someone should think about
      COMMENT ON TABLESPACE and maybe RENAME TABLESPACE.  Also initlocation is
      dead, it just doesn't know it yet.
      
      Gavin Sherry and Tom Lane.
      2467394e
  28. 11 6月, 2004 1 次提交
    • T
      When using extended-query protocol, postpone planning of unnamed statements · 7643bed5
      Tom Lane 提交于
      until Bind is received, so that actual parameter values are visible to the
      planner.  Make use of the parameter values for estimation purposes (but
      don't fold them into the actual plan).  This buys back most of the
      potential loss of plan quality that ensues from using out-of-line
      parameters instead of putting literal values right into the query text.
      
      This patch creates a notion of constant-folding expressions 'for
      estimation purposes only', in which case we can be more aggressive than
      the normal eval_const_expressions() logic can be.  Right now the only
      difference in behavior is inserting bound values for Params, but it will
      be interesting to look at other possibilities.  One that we've seen
      come up repeatedly is reducing now() and related functions to current
      values, so that queries like ... WHERE timestampcol > now() - '1 day'
      have some chance of being planned effectively.
      
      Oliver Jowett, with some kibitzing from Tom Lane.
      7643bed5
  29. 10 6月, 2004 1 次提交
    • T
      Support assignment to subfields of composite columns in UPDATE and INSERT. · 7e64dbc6
      Tom Lane 提交于
      As a side effect, cause subscripts in INSERT targetlists to do something
      more or less sensible; previously we evaluated such subscripts and then
      effectively ignored them.  Another side effect is that UPDATE-ing an
      element or slice of an array value that is NULL now produces a non-null
      result, namely an array containing just the assigned-to positions.
      7e64dbc6
  30. 06 6月, 2004 2 次提交
    • T
      Infrastructure for I/O of composite types: arrange for the I/O routines · c541bb86
      Tom Lane 提交于
      of a composite type to get that type's OID as their second parameter,
      in place of typelem which is useless.  The actual changes are mostly
      centralized in getTypeInputInfo and siblings, but I had to fix a few
      places that were fetching pg_type.typelem for themselves instead of
      using the lsyscache.c routines.  Also, I renamed all the related variables
      from 'typelem' to 'typioparam' to discourage people from assuming that
      they necessarily contain array element types.
      c541bb86
    • T
      Tweak palloc/repalloc to allow zero bytes to be requested, as per recent · c3a153af
      Tom Lane 提交于
      proposal.  Eliminate several dozen now-unnecessary hacks to avoid palloc(0).
      (It's likely there are more that I didn't find.)
      c3a153af
  31. 05 6月, 2004 1 次提交
    • T
      Resurrect heap_deformtuple(), this time implemented as a singly nested · 8f2ea8b7
      Tom Lane 提交于
      loop over the fields instead of a loop around heap_getattr.  This is
      considerably faster (O(N) instead of O(N^2)) when there are nulls or
      varlena fields, since those prevent use of attcacheoff.  Replace loops
      over heap_getattr with heap_deformtuple in situations where all or most
      of the fields have to be fetched, such as printtup and tuptoaster.
      Profiling done more than a year ago shows that this should be a nice
      win for situations involving many-column tables.
      8f2ea8b7
  32. 01 6月, 2004 1 次提交
  33. 31 5月, 2004 1 次提交
  34. 26 5月, 2004 1 次提交
    • N
      Reimplement the linked list data structure used throughout the backend. · d0b4399d
      Neil Conway 提交于
      In the past, we used a 'Lispy' linked list implementation: a "list" was
      merely a pointer to the head node of the list. The problem with that
      design is that it makes lappend() and length() linear time. This patch
      fixes that problem (and others) by maintaining a count of the list
      length and a pointer to the tail node along with each head node pointer.
      A "list" is now a pointer to a structure containing some meta-data
      about the list; the head and tail pointers in that structure refer
      to ListCell structures that maintain the actual linked list of nodes.
      
      The function names of the list API have also been changed to, I hope,
      be more logically consistent. By default, the old function names are
      still available; they will be disabled-by-default once the rest of
      the tree has been updated to use the new API names.
      d0b4399d
  35. 12 5月, 2004 1 次提交