diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2008-11-13 15:59:51 +0000 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2008-11-13 15:59:51 +0000 |
commit | 3379fae6de5994b242cedfa48cf613ecfee3db24 (patch) | |
tree | 677f13d679113c4ef574392e71646f7647dd69ff /src/test/regress/sql/arrays.sql | |
parent | 69a0e2f76d78df9f4e7381fabbf58e8a8d5476f2 (diff) | |
download | postgresql-3379fae6de5994b242cedfa48cf613ecfee3db24.tar.gz postgresql-3379fae6de5994b242cedfa48cf613ecfee3db24.zip |
array_agg aggregate function, as per SQL:2008, but without ORDER BY clause
Rearrange the documentation a bit now that array_agg and xmlagg have similar
semantics and issues.
best of Robert Haas, Jeff Davis, Peter Eisentraut
Diffstat (limited to 'src/test/regress/sql/arrays.sql')
-rw-r--r-- | src/test/regress/sql/arrays.sql | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/regress/sql/arrays.sql b/src/test/regress/sql/arrays.sql index 04b19a4acea..586f65c2dd6 100644 --- a/src/test/regress/sql/arrays.sql +++ b/src/test/regress/sql/arrays.sql @@ -395,3 +395,10 @@ select array_length(array[[1,2,3], [4,5,6]], 3); select cardinality(array[1,2,3]); select cardinality(array[[1,2,3], [4,5,6]]); select c, cardinality(c), d, cardinality(d) from arrtest; + +select array_agg(unique1) from tenk1 where unique1 < 15; +select array_agg(ten) from tenk1 where unique1 < 15; +select array_agg(nullif(ten, 4)) from tenk1 where unique1 < 15; +select cardinality(array_agg(unique1)) from tenk1 where unique1 < 15; +select array_agg(unique1) from (select * from tenk1 order by unique1 asc) as tab where unique1 < 15; +select array_agg(unique1) from tenk1 where unique1 < -15; |