1. 14 3月, 2005 2 次提交
  2. 13 3月, 2005 1 次提交
    • T
      Adjust the API for aggregate function calls so that a C-coded function · fa5e4401
      Tom Lane 提交于
      can tell whether it is being used as an aggregate or not.  This allows
      such a function to avoid re-pallocing a pass-by-reference transition
      value; normally it would be unsafe for a function to scribble on an input,
      but in the aggregate case it's safe to reuse the old transition value.
      Make int8inc() do this.  This gets a useful improvement in the speed of
      COUNT(*), at least on narrow tables (it seems to be swamped by I/O when
      the table rows are wide).  Per a discussion in early December with
      Neil Conway.  I also fixed int_aggregate.c to check this, thereby
      turning it into something approaching a supportable technique instead
      of being a crude hack.
      fa5e4401
  3. 11 3月, 2005 1 次提交
    • T
      Make the behavior of HAVING without GROUP BY conform to the SQL spec. · 595ed2a8
      Tom Lane 提交于
      Formerly, if such a clause contained no aggregate functions we mistakenly
      treated it as equivalent to WHERE.  Per spec it must cause the query to
      be treated as a grouped query of a single group, the same as appearance
      of aggregate functions would do.  Also, the HAVING filter must execute
      after aggregate function computation even if it itself contains no
      aggregate functions.
      595ed2a8
  4. 07 3月, 2005 1 次提交
  5. 11 2月, 2005 1 次提交
  6. 29 1月, 2005 1 次提交
  7. 28 1月, 2005 1 次提交
  8. 27 1月, 2005 1 次提交
  9. 15 1月, 2005 1 次提交
  10. 01 1月, 2005 2 次提交
    • B
      Update copyrights that were missed. · 2daed8c5
      Bruce Momjian 提交于
      2daed8c5
    • 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
  11. 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
  12. 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
  13. 25 10月, 2004 1 次提交
  14. 21 10月, 2004 1 次提交
  15. 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
  16. 11 10月, 2004 1 次提交
  17. 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
  18. 01 10月, 2004 1 次提交
  19. 24 9月, 2004 1 次提交
  20. 23 9月, 2004 2 次提交
  21. 18 9月, 2004 1 次提交
  22. 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
  23. 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
  24. 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
  25. 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
  26. 07 9月, 2004 1 次提交
  27. 29 8月, 2004 2 次提交
  28. 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
  29. 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
  30. 01 8月, 2004 1 次提交
  31. 27 7月, 2004 1 次提交
  32. 15 7月, 2004 1 次提交
  33. 11 7月, 2004 1 次提交
  34. 02 7月, 2004 1 次提交