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

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Undocumented array_val[generate_series(...)] functionality?
Date: 2021-07-12 00:58:14
Message-ID: CAKFQuwYuBGGL90uUCMb3TQB+pSxgvLJVRv_YP5UrUFN_KKj8=A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Jul 11, 2021 at 5:43 PM David Rowley <dgrowleyml(at)gmail(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Rowley 2021-07-12 01:06:09 Re: Undocumented array_val[generate_series(...)] functionality?
Previous Message David Rowley 2021-07-12 00:42:47 Re: Undocumented array_val[generate_series(...)] functionality?