1. 28 10月, 2015 1 次提交
  2. 22 11月, 2006 1 次提交
  3. 18 11月, 2006 1 次提交
  4. 08 11月, 2006 1 次提交
  5. 07 11月, 2006 1 次提交
    • T
      Repair bug #2694 concerning an ARRAY[] construct whose inputs are empty · f0395d50
      Tom Lane 提交于
      sub-arrays.  Per discussion, if all inputs are empty arrays then result
      must be an empty array too, whereas a mix of empty and nonempty arrays
      should (and already did) draw an error.  In the back branches, the
      construct was strict: any NULL input immediately yielded a NULL output;
      so I left that behavior alone.  HEAD was simply ignoring NULL sub-arrays,
      which doesn't seem very sensible.  For lack of a better idea it now
      treats NULL sub-arrays the same as empty ones.
      f0395d50
  6. 13 10月, 2006 1 次提交
    • T
      Fix mishandling of after-trigger state when a SQL function returns multiple · d2e17e1d
      Tom Lane 提交于
      rows --- if the surrounding query queued any trigger events between the rows,
      the events would be fired at the wrong time, leading to bizarre behavior.
      Per report from Merlin Moncure.
      
      This is a simple patch that should solve the problem fully in the back
      branches, but in HEAD we also need to consider the possibility of queries
      with RETURNING clauses.  Will look into a fix for that separately.
      d2e17e1d
  7. 07 10月, 2006 1 次提交
  8. 04 10月, 2006 1 次提交
  9. 29 9月, 2006 1 次提交
    • T
      Fix IS NULL and IS NOT NULL tests on row-valued expressions to conform to · f213131f
      Tom Lane 提交于
      the SQL spec, viz IS NULL is true if all the row's fields are null, IS NOT
      NULL is true if all the row's fields are not null.  The former coding got
      this right for a limited number of cases with IS NULL (ie, those where it
      could disassemble a ROW constructor at parse time), but was entirely wrong
      for IS NOT NULL.  Per report from Teodor.
      
      I desisted from changing the behavior for arrays, since on closer inspection
      it's not clear that there's any support for that in the SQL spec.  This
      probably needs more consideration.
      f213131f
  10. 08 9月, 2006 1 次提交
    • T
      Clean up logging for extended-query-protocol operations, as per my recent · 893632be
      Tom Lane 提交于
      proposal.  Parameter logging works even for binary-format parameters, and
      logging overhead is avoided when disabled.
      
      log_statement = all output for the src/test/examples/testlibpq3.c example
      now looks like
      
      LOG:  statement: execute <unnamed>: SELECT * FROM test1 WHERE t = $1
      DETAIL:  parameters: $1 = 'joe''s place'
      LOG:  statement: execute <unnamed>: SELECT * FROM test1 WHERE i = $1::int4
      DETAIL:  parameters: $1 = '2'
      
      and log_min_duration_statement = 0 results in
      
      LOG:  duration: 2.431 ms  parse <unnamed>: SELECT * FROM test1 WHERE t = $1
      LOG:  duration: 2.335 ms  bind <unnamed> to <unnamed>: SELECT * FROM test1 WHERE t = $1
      DETAIL:  parameters: $1 = 'joe''s place'
      LOG:  duration: 0.394 ms  execute <unnamed>: SELECT * FROM test1 WHERE t = $1
      DETAIL:  parameters: $1 = 'joe''s place'
      LOG:  duration: 1.251 ms  parse <unnamed>: SELECT * FROM test1 WHERE i = $1::int4
      LOG:  duration: 0.566 ms  bind <unnamed> to <unnamed>: SELECT * FROM test1 WHERE i = $1::int4
      DETAIL:  parameters: $1 = '2'
      LOG:  duration: 0.173 ms  execute <unnamed>: SELECT * FROM test1 WHERE i = $1::int4
      DETAIL:  parameters: $1 = '2'
      
      (This example demonstrates the folly of ignoring parse/bind steps for duration
      logging purposes, BTW.)
      
      Along the way, create a less ad-hoc mechanism for determining which commands
      are logged by log_statement = mod and log_statement = ddl.  The former coding
      was actually missing quite a few things that look like ddl to me, and it
      did not handle EXECUTE or extended query protocol correctly at all.
      
      This commit does not do anything about the question of whether log_duration
      should be removed or made less redundant with log_min_duration_statement.
      893632be
  11. 07 9月, 2006 1 次提交
    • T
      Change processing of extended-Query mode so that an unnamed statement · 5983a1aa
      Tom Lane 提交于
      that has parameters is always planned afresh for each Bind command,
      treating the parameter values as constants in the planner.  This removes
      the performance penalty formerly often paid for using out-of-line
      parameters --- with this definition, the planner can do constant folding,
      LIKE optimization, etc.  After a suggestion by Andrew@supernews.
      5983a1aa
  12. 03 9月, 2006 2 次提交
  13. 29 8月, 2006 1 次提交
    • B
      Now bind displays prepare as detail, and execute displays prepare and · bc24d5b9
      Bruce Momjian 提交于
      optionally bind.  I re-added the "statement:" label so people will
      understand why the line is being printed (it is log_*statement
      behavior).
      
      Use single quotes for bind values, instead of double quotes, and double
      literal single quotes in bind values (and document that).  I also made
      use of the DETAIL line to have much cleaner output.
      bc24d5b9
  14. 28 8月, 2006 1 次提交
    • T
      Add new return codes SPI_OK_INSERT_RETURNING etc to the SPI API. · ea2e2635
      Tom Lane 提交于
      Fix all the standard PLs to be able to return tuples from FOO_RETURNING
      statements as well as utility statements that return tuples.  Also,
      fix oversight that SPI_processed wasn't set for a utility statement
      returning tuples.  Per recent discussion.
      ea2e2635
  15. 15 8月, 2006 1 次提交
    • T
      Fix oversight in initial implementation of PORTAL_ONE_RETURNING mode: we · 65b2f93b
      Tom Lane 提交于
      cannot assume that there's exactly one Query in the Portal, as we can for
      ONE_SELECT mode, because non-SELECT queries might have extra queries added
      during rule rewrites.  Fix things up so that we'll use ONE_RETURNING mode
      when a Portal contains one primary (canSetTag) query and that query has
      a RETURNING list.  This appears to be a second showstopper reason for running
      the Portal to completion before we start to hand anything back --- we want
      to be sure that the rule-added queries get run too.
      65b2f93b
  16. 14 8月, 2006 1 次提交
    • T
      When executing a list of queries derived from rule expansion, · 29fa0513
      Tom Lane 提交于
      _SPI_execute_plan's return code should reflect the type of the query
      that is marked canSetTag, not necessarily the last one in the list.
      
      This is arguably a bug fix, but I'm hesitant to back-patch it because
      it's the sort of subtle change that might break someone's code, and it's
      best not to do that kind of thing in point releases.
      29fa0513
  17. 13 8月, 2006 1 次提交
    • T
      Tweak SPI_cursor_open to allow INSERT/UPDATE/DELETE RETURNING; this was · 3f8db37c
      Tom Lane 提交于
      merely a matter of fixing the error check, since the underlying Portal
      infrastructure already handles it.  This in turn allows these statements
      to be used in some existing plpgsql and plperl contexts, such as a
      plpgsql FOR loop.  Also, do some marginal code cleanup in places that
      were being sloppy about distinguishing SELECT from SELECT INTO.
      3f8db37c
  18. 12 8月, 2006 1 次提交
  19. 08 8月, 2006 1 次提交
    • B
      For protocol-level prepare/bind/execute: · 3716f90c
      Bruce Momjian 提交于
      	o  print user name for all
      	o  print portal name if defined for all
      	o  print query for all
      	o  reduce log_statement header to single keyword
      	o  print bind parameters as DETAIL if text mode
      3716f90c
  20. 05 8月, 2006 1 次提交
    • T
      Fix domain_in() bug exhibited by Darcy Buskermolen. The idea of an EState · c6848986
      Tom Lane 提交于
      that's shorter-lived than the expression state being evaluated in it really
      doesn't work :-( --- we end up with fn_extra caches getting deleted while
      still in use.  Rather than abandon the notion of caching expression state
      across domain_in calls altogether, I chose to make domain_in a bit cozier
      with ExprContext.  All we really need for evaluating variable-free
      expressions is an ExprContext, not an EState, so I invented the notion of a
      "standalone" ExprContext.  domain_in can prevent resource leakages by doing
      a ReScanExprContext on this rather than having to free it entirely; so we
      can make the ExprContext have the same lifespan (and particularly the same
      per_query memory context) as the expression state structs.
      c6848986
  21. 03 8月, 2006 1 次提交
    • T
      Arrange for ValuesScan to keep per-sublist expression eval state in a · 0dfb595d
      Tom Lane 提交于
      temporary context that can be reset when advancing to the next sublist.
      This is faster and more thorough at recovering space than the previous
      method; moreover it will do the right thing if something in the sublist
      tries to register an expression context callback.
      0dfb595d
  22. 02 8月, 2006 1 次提交
  23. 01 8月, 2006 1 次提交
    • T
      Change the relation_open protocol so that we obtain lock on a relation · 09d3670d
      Tom Lane 提交于
      (table or index) before trying to open its relcache entry.  This fixes
      race conditions in which someone else commits a change to the relation's
      catalog entries while we are in process of doing relcache load.  Problems
      of that ilk have been reported sporadically for years, but it was not
      really practical to fix until recently --- for instance, the recent
      addition of WAL-log support for in-place updates helped.
      
      Along the way, remove pg_am.amconcurrent: all AMs are now expected to support
      concurrent update.
      09d3670d
  24. 31 7月, 2006 1 次提交
    • T
      Change the bootstrap sequence so that toast tables for system catalogs are · 6e38e34d
      Tom Lane 提交于
      created in the bootstrap phase proper, rather than added after-the-fact
      by initdb.  This is cleaner than before because it allows us to retire the
      undocumented ALTER TABLE ... CREATE TOAST TABLE command, but the real reason
      I'm doing it is so that toast tables of shared catalogs will now have
      predetermined OIDs.  This will allow a reasonably clean solution to the
      problem of locking tables before we load their relcache entries, to appear
      in a forthcoming patch.
      6e38e34d
  25. 28 7月, 2006 1 次提交
    • T
      Aggregate functions now support multiple input arguments. I also took · 108fe473
      Tom Lane 提交于
      the opportunity to treat COUNT(*) as a zero-argument aggregate instead
      of the old hack that equated it to COUNT(1); this is materially cleaner
      (no more weird ANYOID cases) and ought to be at least a tiny bit faster.
      Original patch by Sergey Koposov; review, documentation, simple regression
      tests, pg_dump and psql support by moi.
      108fe473
  26. 27 7月, 2006 1 次提交
  27. 26 7月, 2006 1 次提交
  28. 14 7月, 2006 5 次提交
  29. 12 7月, 2006 1 次提交
  30. 04 7月, 2006 1 次提交
    • T
      Code review for FILLFACTOR patch. Change WITH grammar as per earlier · b7b78d24
      Tom Lane 提交于
      discussion (including making def_arg allow reserved words), add missed
      opt_definition for UNIQUE case.  Put the reloptions support code in a less
      random place (I chose to make a new file access/common/reloptions.c).
      Eliminate header inclusion creep.  Make the index options functions safely
      user-callable (seems like client apps might like to be able to test validity
      of options before trying to make an index).  Reduce overhead for normal case
      with no options by allowing rd_options to be NULL.  Fix some unmaintainably
      klugy code, including getting rid of Natts_pg_class_fixed at long last.
      Some stylistic cleanup too, and pay attention to keeping comments in sync
      with code.
      
      Documentation still needs work, though I did fix the omissions in
      catalogs.sgml and indexam.sgml.
      b7b78d24
  31. 02 7月, 2006 1 次提交
  32. 29 6月, 2006 2 次提交
  33. 28 6月, 2006 2 次提交