Re: cardinality()
От | Tom Lane |
---|---|
Тема | Re: cardinality() |
Дата | |
Msg-id | 12505.1235926160@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: cardinality() (Andrew Dunstan <andrew@dunslane.net>) |
Ответы |
Re: cardinality()
|
Список | pgsql-hackers |
Andrew Dunstan <andrew@dunslane.net> writes: > Grzegorz Jaskiewicz wrote: >> On 1 Mar 2009, at 00:52, Andrew Dunstan wrote: >>> We seem to have acquired a cardinality() function with almost no >>> discussion, and it has semantics that are a bit surprising to me. I >>> should have thought cardinality(array) would be the total number of >.> elements in the array. Instead, it seems it is a synonym for >>> array_length(array,1). Is that *really* what the standard says? >> Standart just says something like: >> cardinality (a collection): >> - The number of elements in that collection. The standard doesn't have multi-dimensional arrays, so it's entirely possible that somewhere in it there is wording that makes cardinality() equivalent to the length of the first dimension. But I concur with Andrew that this is flat wrong when extended to m-d arrays. regards, tom lane
В списке pgsql-hackers по дате отправления: