summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorTom Lane2009-04-09 17:39:50 +0000
committerTom Lane2009-04-09 17:39:50 +0000
commit06e2757277e746fde9eeca14a86f87b7a61ff5b7 (patch)
tree258ff78625baf55b07e35b8ea7fcd993d1482633 /src/test
parent78f58f0f70e0b6542a8ecb4e3ceaf4d41cf58cb3 (diff)
Remove SQL-compatibility function cardinality(). It is not exactly clear
how this ought to behave for multi-dimensional arrays. Per discussion, not having it at all seems better than having it with what might prove to be the wrong behavior. We can always add it later when we have consensus on the correct behavior.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/regress/expected/arrays.out26
-rw-r--r--src/test/regress/sql/arrays.sql4
2 files changed, 0 insertions, 30 deletions
diff --git a/src/test/regress/expected/arrays.out b/src/test/regress/expected/arrays.out
index ec2fd52c7f8..c7ddc2d7aa5 100644
--- a/src/test/regress/expected/arrays.out
+++ b/src/test/regress/expected/arrays.out
@@ -1105,26 +1105,6 @@ select array_length(array[[1,2,3], [4,5,6]], 3);
(1 row)
-select cardinality(array[1,2,3]);
- cardinality
--------------
- 3
-(1 row)
-
-select cardinality(array[[1,2,3], [4,5,6]]);
- cardinality
--------------
- 2
-(1 row)
-
-select c, cardinality(c), d, cardinality(d) from arrtest;
- c | cardinality | d | cardinality
--------------------+-------------+---------------+-------------
- {} | | {} |
- {foobar,new_word} | 2 | {{elt1,elt2}} | 1
- {foo,new_word} | 2 | {bar,foo} | 2
-(3 rows)
-
select array_agg(unique1) from (select unique1 from tenk1 where unique1 < 15 order by unique1) ss;
array_agg
--------------------------------------
@@ -1143,12 +1123,6 @@ select array_agg(nullif(ten, 4)) from (select ten from tenk1 where unique1 < 15
{0,1,2,3,NULL,5,6,7,8,9,0,1,2,3,NULL}
(1 row)
-select cardinality(array_agg(unique1)) from tenk1 where unique1 < 15;
- cardinality
--------------
- 15
-(1 row)
-
select array_agg(unique1) from tenk1 where unique1 < -15;
array_agg
-----------
diff --git a/src/test/regress/sql/arrays.sql b/src/test/regress/sql/arrays.sql
index a4a91b034c9..5e4933c31d3 100644
--- a/src/test/regress/sql/arrays.sql
+++ b/src/test/regress/sql/arrays.sql
@@ -392,14 +392,10 @@ select array_length(array[[1,2,3], [4,5,6]], 0);
select array_length(array[[1,2,3], [4,5,6]], 1);
select array_length(array[[1,2,3], [4,5,6]], 2);
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 (select unique1 from tenk1 where unique1 < 15 order by unique1) ss;
select array_agg(ten) from (select ten from tenk1 where unique1 < 15 order by unique1) ss;
select array_agg(nullif(ten, 4)) from (select ten from tenk1 where unique1 < 15 order by unique1) ss;
-select cardinality(array_agg(unique1)) from tenk1 where unique1 < 15;
select array_agg(unique1) from tenk1 where unique1 < -15;
select unnest(array[1,2,3]);