Re: [GENERAL] ARRAY_LENGTH() function behavior with empty array

2016-12-02 Thread otar shavadze
Understood, and backwards compatibility also of course. Thank you On Fri, Dec 2, 2016 at 7:20 PM, Tom Lane wrote: > otar shavadze writes: > > SELECT ARRAY_LENGTH('{}'::INT[], 1) > > This returns NULL, not so "dangerous" either way, not would be more > > logically, if array length function wi

Re: [GENERAL] ARRAY_LENGTH() function behavior with empty array

2016-12-02 Thread Tom Lane
otar shavadze writes: > SELECT ARRAY_LENGTH('{}'::INT[], 1) > This returns NULL, not so "dangerous" either way, not would be more > logically, if array length function will return 0 from empty array, > instead of NULL ? Well, the issue is that you're asking about dimension 1 of a zero-dimension