Re: array_length()
От | Tom Lane |
---|---|
Тема | Re: array_length() |
Дата | |
Msg-id | 14206.1225898117@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: array_length() (Peter Eisentraut <peter_e@gmx.net>) |
Ответы |
Re: array_length()
|
Список | pgsql-hackers |
Peter Eisentraut <peter_e@gmx.net> writes: > There is a tiny problem with this implementation: It returns null for an > empty array, not zero. This is because array_lower and/or array_upper > return null for an empty array, which makes sense for those cases. We > could fix this by putting a coalesce around the expression, but since > the array functions return null for all kinds of error cases, this might > mask other problems. Or we move to a C implementation. Basic functionality like this shouldn't be implemented as a SQL function anyway. People don't expect that some built-in functions should be several orders of magnitude slower than other built-in functions of apparently similar complexity. regards, tom lane
В списке pgsql-hackers по дате отправления: