From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Grzegorz Jaskiewicz <gj(at)pointblue(dot)com(dot)pl> |
Cc: | PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: cardinality() |
Date: | 2009-03-01 15:30:46 |
Message-ID: | 49AAAA26.3080901@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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?
>
> any difference between array_upper(array,1), and cardinality ?
> Standart just says something like:
>
> cardinality (a collection):
> - The number of elements in that collection.
> - Those elements need not necessarily have distinct values.
> - The objects to which this concept applies includes tables and the
> values of collection types.
>
Well, I think that's a definition of the term as used in the standard,
rather than of a function. But in any case, I think it goes in the right
direction, and the semantics of our new function (as well as the docs)
are misleading.
I'm also a bit concerned that I could not find any real discussion of
this new function at all on this list, so our processes seem to have
slipped a bit.
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-03-01 16:49:20 | Re: cardinality() |
Previous Message | Andrew Dunstan | 2009-03-01 15:13:10 | Re: xpath processing brain dead |