Re: [BUGS] BUG #14648: counts for queries using array unnesting is incorrect
От | David G. Johnston |
---|---|
Тема | Re: [BUGS] BUG #14648: counts for queries using array unnesting is incorrect |
Дата | |
Msg-id | CAKFQuwYRNvL3xR2NOm9V=9G1LRpLcAc5a=6Du-NbVkXa3UU6ow@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [BUGS] BUG #14648: counts for queries using array unnesting is incorrect (Sebastion Calbaza <sebastian.calbaza@hgdata.com>) |
Ответы |
Re: [BUGS] BUG #14648: counts for queries using array unnesting is incorrect
|
Список | pgsql-bugs |
You are correct, this is how it behaves.
For my dev mind (probably for others ) this was pretty non intuitive. In the end I used array_length and sum to compute the count.
Still, is this the intended behaviour (I guess so from a mathematical point of view ?? )? If it is I can argue that is not too intuitive and adding a doc note near the unnest function description would be good.
Yes, its intentional, and it isn't specific to just the unnest function so documenting it just there doesn't seem correct. I don't know where it is documented but I suspect that even just reading the documentation for this would be of minimal help - I think its likely best learned after experiencing the aforementioned problem.
David J.
В списке pgsql-bugs по дате отправления: