mirror of
https://github.com/postgres/postgres.git
synced 2025-07-05 07:21:24 +03:00
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.
This commit is contained in:
@ -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]);
|
||||
|
Reference in New Issue
Block a user