1. 28 10月, 2009 1 次提交
    • T
      Make FOR UPDATE/SHARE in the primary query not propagate into WITH queries; · 61e53282
      Tom Lane 提交于
      for example in
        WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE
      the FOR UPDATE will now affect bar but not foo.  This is more useful and
      consistent than the original 8.4 behavior, which tried to propagate FOR UPDATE
      into the WITH query but always failed due to assorted implementation
      restrictions.  Even though we are in process of removing those restrictions,
      it seems correct on philosophical grounds to not let the outer query's
      FOR UPDATE affect the WITH query.
      
      In passing, fix isLockedRel which frequently got things wrong in
      nested-subquery cases: "FOR UPDATE OF foo" applies to an alias foo in the
      current query level, not subqueries.  This has been broken for a long time,
      but it doesn't seem worth back-patching further than 8.4 because the actual
      consequences are minimal.  At worst the parser would sometimes get
      RowShareLock on a relation when it should be AccessShareLock or vice versa.
      That would only make a difference if someone were using ExclusiveLock
      concurrently, which no standard operation does, and anyway FOR UPDATE
      doesn't result in visible changes so it's not clear that the someone would
      notice any problem.  Between that and the fact that FOR UPDATE barely works
      with subqueries at all in existing releases, I'm not excited about worrying
      about it.
      61e53282
  2. 22 10月, 2009 1 次提交
  3. 18 9月, 2009 1 次提交
    • P
      Easier to translate psql help · 20f7f019
      Peter Eisentraut 提交于
      Instead of requiring translators to translate the entire SQL command
      synopses, change create_help.pl to only require them to translate the
      placeholders, and paste those into the synopsis using a printf mechanism.
      Make some small updates to the markup to make it easier to parse.
      
      Note: This causes msgmerge of gettext 0.17 to segfault.  You will need
      the patch from https://savannah.gnu.org/bugs/?27474 to make it work.
      msgmerge usually only runs on babel.postgresql.org, however.
      20f7f019
  4. 28 8月, 2009 1 次提交
    • T
      Modify the definition of window-function PARTITION BY and ORDER BY clauses · bb16dc49
      Tom Lane 提交于
      so that their elements are always taken as simple expressions over the
      query's input columns.  It originally seemed like a good idea to make them
      act exactly like GROUP BY and ORDER BY, right down to the SQL92-era behavior
      of accepting output column names or numbers.  However, that was not such a
      great idea, for two reasons:
      
      1. It permits circular references, as exhibited in bug #5018: the output
      column could be the one containing the window function itself.  (We actually
      had a regression test case illustrating this, but nobody thought twice about
      how confusing that would be.)
      
      2. It doesn't seem like a good idea for, eg, "lead(foo) OVER (ORDER BY foo)"
      to potentially use two completely different meanings for "foo".
      
      Accordingly, narrow down the behavior of window clauses to use only the
      SQL99-compliant interpretation that the expressions are simple expressions.
      bb16dc49
  5. 19 8月, 2009 1 次提交
  6. 04 5月, 2009 1 次提交
  7. 16 4月, 2009 1 次提交
  8. 03 2月, 2009 1 次提交
  9. 23 1月, 2009 2 次提交
  10. 12 1月, 2009 1 次提交
  11. 01 1月, 2009 1 次提交
  12. 31 12月, 2008 1 次提交
    • T
      Add some basic support for window frame clauses to the window-functions · 8e8854da
      Tom Lane 提交于
      patch.  This includes the ability to force the frame to cover the whole
      partition, and the ability to make the frame end exactly on the current row
      rather than its last ORDER BY peer.  Supporting any more of the full SQL
      frame-clause syntax will require nontrivial hacking on the window aggregate
      code, so it'll have to wait for 8.5 or beyond.
      8e8854da
  13. 30 12月, 2008 1 次提交
  14. 29 12月, 2008 1 次提交
  15. 01 12月, 2008 1 次提交
  16. 21 11月, 2008 1 次提交
  17. 20 11月, 2008 1 次提交
  18. 19 11月, 2008 1 次提交
  19. 14 11月, 2008 1 次提交
  20. 22 10月, 2008 1 次提交
  21. 08 10月, 2008 1 次提交
  22. 05 10月, 2008 1 次提交
    • T
      Implement SQL-standard WITH clauses, including WITH RECURSIVE. · 44d5be0e
      Tom Lane 提交于
      There are some unimplemented aspects: recursive queries must use UNION ALL
      (should allow UNION too), and we don't have SEARCH or CYCLE clauses.
      These might or might not get done for 8.4, but even without them it's a
      pretty useful feature.
      
      There are also a couple of small loose ends and definitional quibbles,
      which I'll send a memo about to pgsql-hackers shortly.  But let's land
      the patch now so we can get on with other development.
      
      Yoshiyuki Asaba, with lots of help from Tatsuo Ishii and Tom Lane
      44d5be0e
  23. 23 9月, 2008 1 次提交
  24. 16 2月, 2008 1 次提交
  25. 28 11月, 2007 1 次提交
  26. 09 6月, 2007 1 次提交
  27. 16 5月, 2007 1 次提交
  28. 02 2月, 2007 1 次提交
    • B
      Wording cleanup for error messages. Also change can't -> cannot. · 8b4ff8b6
      Bruce Momjian 提交于
      Standard English uses "may", "can", and "might" in different ways:
      
              may - permission, "You may borrow my rake."
      
              can - ability, "I can lift that log."
      
              might - possibility, "It might rain today."
      
      Unfortunately, in conversational English, their use is often mixed, as
      in, "You may use this variable to do X", when in fact, "can" is a better
      choice.  Similarly, "It may crash" is better stated, "It might crash".
      8b4ff8b6
  29. 01 2月, 2007 2 次提交
  30. 10 1月, 2007 1 次提交
  31. 09 1月, 2007 1 次提交
    • T
      Support ORDER BY ... NULLS FIRST/LAST, and add ASC/DESC/NULLS FIRST/NULLS LAST · 44317582
      Tom Lane 提交于
      per-column options for btree indexes.  The planner's support for this is still
      pretty rudimentary; it does not yet know how to plan mergejoins with
      nondefault ordering options.  The documentation is pretty rudimentary, too.
      I'll work on improving that stuff later.
      
      Note incompatible change from prior behavior: ORDER BY ... USING will now be
      rejected if the operator is not a less-than or greater-than member of some
      btree opclass.  This prevents less-than-sane behavior if an operator that
      doesn't actually define a proper sort ordering is selected.
      44317582
  32. 02 12月, 2006 1 次提交
  33. 19 9月, 2006 1 次提交
  34. 16 9月, 2006 1 次提交
  35. 01 5月, 2006 1 次提交
  36. 02 11月, 2005 1 次提交
  37. 02 8月, 2005 1 次提交
  38. 14 7月, 2005 1 次提交