On Mon, 12 Jul 2021 at 12:58, David G. Johnston
<david.g.johnston@gmail.com> wrote:
>
> 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.
I'd say in your example the array with the subscript does not become
an SRF anymore than abs() becomes an SRF in the following:
select abs(generate_series(-3,-1));
abs() is simply called once per output value of the generate_series
SRF. That seems fairly equivalent to me to what's going on in your
example case.
David