1. 30 1月, 2014 1 次提交
  2. 29 1月, 2014 3 次提交
  3. 24 1月, 2014 1 次提交
  4. 23 1月, 2014 1 次提交
  5. 22 1月, 2014 1 次提交
    • R
      Add a cardinality function for arrays. · 01f7808b
      Robert Haas 提交于
      Unlike our other array functions, this considers the total number of
      elements across all dimensions, and returns 0 rather than NULL when the
      array has no elements.  But it seems that both of those behaviors are
      almost universally disliked, so hopefully that's OK.
      
      Marko Tiikkaja, reviewed by Dean Rasheed and Pavel Stehule
      01f7808b
  6. 13 1月, 2014 1 次提交
  7. 24 12月, 2013 1 次提交
    • T
      Support ordered-set (WITHIN GROUP) aggregates. · 8d65da1f
      Tom Lane 提交于
      This patch introduces generic support for ordered-set and hypothetical-set
      aggregate functions, as well as implementations of the instances defined in
      SQL:2008 (percentile_cont(), percentile_disc(), rank(), dense_rank(),
      percent_rank(), cume_dist()).  We also added mode() though it is not in the
      spec, as well as versions of percentile_cont() and percentile_disc() that
      can compute multiple percentile values in one pass over the data.
      
      Unlike the original submission, this patch puts full control of the sorting
      process in the hands of the aggregate's support functions.  To allow the
      support functions to find out how they're supposed to sort, a new API
      function AggGetAggref() is added to nodeAgg.c.  This allows retrieval of
      the aggregate call's Aggref node, which may have other uses beyond the
      immediate need.  There is also support for ordered-set aggregates to
      install cleanup callback functions, so that they can be sure that
      infrastructure such as tuplesort objects gets cleaned up.
      
      In passing, make some fixes in the recently-added support for variadic
      aggregates, and make some editorial adjustments in the recent FILTER
      additions for aggregates.  Also, simplify use of IsBinaryCoercible() by
      allowing it to succeed whenever the target type is ANY or ANYELEMENT.
      It was inconsistent that it dealt with other polymorphic target types
      but not these.
      
      Atri Sharma and Andrew Gierth; reviewed by Pavel Stehule and Vik Fearing,
      and rather heavily editorialized upon by Tom Lane
      8d65da1f
  8. 22 11月, 2013 1 次提交
    • T
      Support multi-argument UNNEST(), and TABLE() syntax for multiple functions. · 784e762e
      Tom Lane 提交于
      This patch adds the ability to write TABLE( function1(), function2(), ...)
      as a single FROM-clause entry.  The result is the concatenation of the
      first row from each function, followed by the second row from each
      function, etc; with NULLs inserted if any function produces fewer rows than
      others.  This is believed to be a much more useful behavior than what
      Postgres currently does with multiple SRFs in a SELECT list.
      
      This syntax also provides a reasonable way to combine use of column
      definition lists with WITH ORDINALITY: put the column definition list
      inside TABLE(), where it's clear that it doesn't control the ordinality
      column as well.
      
      Also implement SQL-compliant multiple-argument UNNEST(), by turning
      UNNEST(a,b,c) into TABLE(unnest(a), unnest(b), unnest(c)).
      
      The SQL standard specifies TABLE() with only a single function, not
      multiple functions, and it seems to require an implicit UNNEST() which is
      not what this patch does.  There may be something wrong with that reading
      of the spec, though, because if it's right then the spec's TABLE() is just
      a pointless alternative spelling of UNNEST().  After further review of
      that, we might choose to adopt a different syntax for what this patch does,
      but in any case this functionality seems clearly worthwhile.
      
      Andrew Gierth, reviewed by Zoltán Böszörményi and Heikki Linnakangas, and
      significantly revised by me
      784e762e
  9. 18 11月, 2013 1 次提交
  10. 11 11月, 2013 1 次提交
  11. 28 10月, 2013 1 次提交
    • N
      Add large object functions catering to SQL callers. · c50b7c09
      Noah Misch 提交于
      With these, one need no longer manipulate large object descriptors and
      extract numeric constants from header files in order to read and write
      large object contents from SQL.
      
      Pavel Stehule, reviewed by Rushabh Lathia.
      c50b7c09
  12. 24 10月, 2013 1 次提交
    • H
      Improve documentation of random() function. · 75fdcec1
      Heikki Linnakangas 提交于
      Move random() and setseed() to a separate table, to have them grouped
      together. Also add a notice that random() is not cryptographically secure.
      
      Original patch by Honza Horak, although I didn't use his version.
      75fdcec1
  13. 11 10月, 2013 1 次提交
  14. 10 10月, 2013 2 次提交
    • P
      Revive line type · 261c7d4b
      Peter Eisentraut 提交于
      Change the input/output format to {A,B,C}, to match the internal
      representation.
      
      Complete the implementations of line_in, line_out, line_recv, line_send.
      Remove comments and error messages about the line type not being
      implemented.  Add regression tests for existing line operators and
      functions.
      Reviewed-by: Nrui hua <365507506hua@gmail.com>
      Reviewed-by: NÁlvaro Herrera <alvherre@2ndquadrant.com>
      Reviewed-by: NJeevan Chalke <jeevan.chalke@enterprisedb.com>
      261c7d4b
    • K
      Add record_image_ops opclass for matview concurrent refresh. · f5665151
      Kevin Grittner 提交于
      REFRESH MATERIALIZED VIEW CONCURRENTLY was broken for any matview
      containing a column of a type without a default btree operator
      class.  It also did not produce results consistent with a non-
      concurrent REFRESH or a normal view if any column was of a type
      which allowed user-visible differences between values which
      compared as equal according to the type's default btree opclass.
      Concurrent matview refresh was modified to use the new operators
      to solve these problems.
      
      Documentation was added for record comparison, both for the
      default btree operator class for record, and the newly added
      operators.  Regression tests now check for proper behavior both
      for a matview with a box column and a matview containing a citext
      column.
      
      Reviewed by Steve Singer, who suggested some of the doc language.
      f5665151
  15. 27 9月, 2013 1 次提交
  16. 04 9月, 2013 3 次提交
  17. 21 8月, 2013 1 次提交
  18. 15 8月, 2013 1 次提交
  19. 10 8月, 2013 2 次提交
  20. 29 7月, 2013 1 次提交
  21. 23 7月, 2013 2 次提交
  22. 22 7月, 2013 1 次提交
    • R
      Add infrastructure for mapping relfilenodes to relation OIDs. · f01d1ae3
      Robert Haas 提交于
      Future patches are expected to introduce logical replication that
      works by decoding WAL.  WAL contains relfilenodes rather than relation
      OIDs, so this infrastructure will be needed to find the relation OID
      based on WAL contents.
      
      If logical replication does not make it into this release, we probably
      should consider reverting this, since it will add some overhead to DDL
      operations that create new relations.  One additional index insert per
      pg_class row is not a large overhead, but it's more than zero.
      Another way of meeting the needs of logical replication would be to
      the relation OID to WAL, but that would burden DML operations, not
      only DDL.
      
      Andres Freund, with some changes by me.  Design review, in earlier
      versions, by Álvaro Herrera.
      f01d1ae3
  23. 19 7月, 2013 1 次提交
  24. 02 7月, 2013 1 次提交
  25. 27 6月, 2013 2 次提交
    • T
      Tweak wording in sequence-function docs to avoid PDF build failures. · a03ae56e
      Tom Lane 提交于
      Adjust the wording in the first para of "Sequence Manipulation Functions"
      so that neither of the link phrases in it break across line boundaries,
      in either A4- or US-page-size PDF output.  This fixes a reported build
      failure for the 9.3beta2 A4 PDF docs, and future-proofs this particular
      para against causing similar problems in future.  (Perhaps somebody will
      fix this issue in the SGML/TeX documentation tool chain someday, but I'm
      not holding my breath.)
      
      Back-patch to all supported branches, since the same problem could rise up
      to bite us in future updates if anyone changes anything earlier than this
      in func.sgml.
      a03ae56e
    • N
      Document effect of constant folding on CASE. · d53f7cf1
      Noah Misch 提交于
      Back-patch to all supported versions.
      
      Laurenz Albe
      d53f7cf1
  26. 13 6月, 2013 1 次提交
    • A
      Fix unescaping of JSON Unicode escapes, especially for non-UTF8. · 78ed8e03
      Andrew Dunstan 提交于
      Per discussion  on -hackers. We treat Unicode escapes when unescaping
      them similarly to the way we treat them in PostgreSQL string literals.
      Escapes in the ASCII range are always accepted, no matter what the
      database encoding. Escapes for higher code points are only processed in
      UTF8 databases, and attempts to process them in other databases will
      result in an error. \u0000 is never unescaped, since it would result in
      an impermissible null byte.
      78ed8e03
  27. 08 6月, 2013 1 次提交
    • A
      Handle Unicode surrogate pairs correctly when processing JSON. · 94e3311b
      Andrew Dunstan 提交于
      In 9.2, Unicode escape sequences are not analysed at all other than
      to make sure that they are in the form \uXXXX. But in 9.3 many of the
      new operators and functions try to turn JSON text values into text in
      the server encoding, and this includes de-escaping Unicode escape
      sequences. This processing had not taken into account the possibility
      that this might contain a surrogate pair to designate a character
      outside the BMP. That is now handled correctly.
      
      This also enforces correct use of surrogate pairs, something that is not
      done by the type's input routines. This fact is noted in the docs.
      94e3311b
  28. 21 5月, 2013 1 次提交
  29. 17 5月, 2013 1 次提交
  30. 07 5月, 2013 1 次提交
    • T
      Move materialized views' is-populated status into their pg_class entries. · 1d6c72a5
      Tom Lane 提交于
      Previously this state was represented by whether the view's disk file had
      zero or nonzero size, which is problematic for numerous reasons, since it's
      breaking a fundamental assumption about heap storage.  This was done to
      allow unlogged matviews to revert to unpopulated status after a crash
      despite our lack of any ability to update catalog entries post-crash.
      However, this poses enough risk of future problems that it seems better to
      not support unlogged matviews until we can find another way.  Accordingly,
      revert that choice as well as a number of existing kluges forced by it
      in favor of creating a pg_class.relispopulated flag column.
      1d6c72a5
  31. 04 4月, 2013 1 次提交
  32. 30 3月, 2013 1 次提交