Re: Undocumented array_val[generate_series(...)] functionality?

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Undocumented array_val[generate_series(...)] functionality?
Дата
Msg-id CAKFQuwYuBGGL90uUCMb3TQB+pSxgvLJVRv_YP5UrUFN_KKj8=A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Undocumented array_val[generate_series(...)] functionality?  (David Rowley <dgrowleyml@gmail.com>)
Ответы Re: Undocumented array_val[generate_series(...)] functionality?  (David Rowley <dgrowleyml@gmail.com>)
Список pgsql-general
On Sun, Jul 11, 2021 at 5:43 PM David Rowley <dgrowleyml@gmail.com> wrote:
Isn't this implied by "Each subscript is itself an expression"?
There's nothing special here with the SRF. That just produces 3 rows
and passes the subscript as 1, 2 then 3.


One can indeed infer that if the expression chosen for subscript is an SRF that the resultant output will also be an SRF.  It seems less than helpful to force the reader to infer that, IMO.  Especially when the slice syntax, which could conceivably return either a sub-array OR a set, the later being the undocumented reality (our function examples document the actual outputs, these examples probably should do the same.  I would be OK if we simply added an SRF example and showed the SRF result it produces without changing the wording - though this doesn't seem like a hard improvement to make.  I'll offer something up if a committer at least agrees it could use some work).

David J.

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

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: Undocumented array_val[generate_series(...)] functionality?
Следующее
От: David Rowley
Дата:
Сообщение: Re: Undocumented array_val[generate_series(...)] functionality?