From: | Vladimir Svedov <vodevsh(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | array_ndims never returns zero |
Date: | 2017-12-29 13:57:33 |
Message-ID: | CADqDLE-+FtA1hHwSk-Y3vfjVfen-z9uYftiLHRFifvWEtV1VGg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
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(); so the question - do you think it makes sense?.. What is
the logic behind it?
Please advise where to address it if I chose the wrong channel, as It's
probably not a bug, but a feature?..
Regards
From | Date | Subject | |
---|---|---|---|
Next Message | John Naylor | 2017-12-29 14:05:28 | Re: MCV lists for highly skewed distributions |
Previous Message | Marco Nenciarini | 2017-12-29 13:15:22 | [PATCH] Logical decoding of TRUNCATE |