array_ndims never returns zero
| От | Vladimir Svedov |
|---|---|
| Тема | array_ndims never returns zero |
| Дата | |
| Msg-id | CADqDLE-+FtA1hHwSk-Y3vfjVfen-z9uYftiLHRFifvWEtV1VGg@mail.gmail.com обсуждение исходный текст |
| Ответы |
Re: array_ndims never returns zero
|
| Список | pgsql-hackers |
Hi,
so the question - do you think it makes sense?.. What is the logic behind it?
Reading https://stackoverflow.com/questions/48022753/why-does-array-ndimsarray-produce-null#48022980 confused me much - why array_ndims never returns zero indeed?..
select char_length('') returns zero and according to https://www.postgresql.org/docs/current/static/functions-string.html it shows the "Number of characters in string ",on the other hand https://www.postgresql.org/docs/10/static/functions-array.html array_ndims "returns the number of dimensions of the array",but https://github.com/postgres/postgres/blob/master/src/backend/utils/adt/arrayfuncs.c#L1635
| if (AARR_NDIM(v) <= 0 || AARR_NDIM(v) > MAXDIM) | |
| PG_RETURN_NULL(); |
Please advise where to address it if I chose the wrong channel, as It's probably not a bug, but a feature?..
Regards
В списке pgsql-hackers по дате отправления: