Re: doc: array_length produces null instead of 0

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: doc: array_length produces null instead of 0
Дата
Msg-id YsjK1JO7E5rOegYn@momjian.us
обсуждение исходный текст
Ответ на Re: doc: array_length produces null instead of 0  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-hackers
On Tue, Jun 21, 2022 at 09:02:41AM -0700, David G. Johnston wrote:
> On Tue, Jun 21, 2022 at 6:33 AM Aleksander Alekseev <aleksander@timescale.com>
>     Maybe it's worth using `array_length(array[] :: int[], 1)` instead.
> 
> I think subconsciously the cast looked ugly to me so I probably skipped adding
> it.  I do agree the example should be executable though, and most of the
> existing examples use integer[] (not the abbreviated form, int) so I'll plan to
> go with that.

Patch applied through PG 13, with adjustments suggested above.  Our doc
formatting for pre-PG 13 was too different for me to risk backpatching
further back.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Indecision is a decision.  Inaction is an action.  Mark Batterson




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Yura Sokolov
Дата:
Сообщение: Re: [PATCH] fix wait_event of pg_stat_activity in case of high amount of connections
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: doc: Bring mention of unique index forced transaction wait behavior outside of the internal section