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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, David Rowley <dgrowleyml(at)gmail(dot)com>, "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 14:27:01
Message-ID: 2947769.1626100021@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> writes:
> BTW, this is something that started working in PG10 (in 9.6, an error
> is thrown), and I think that it's a result of this release note item,
> which matches your conclusions:
> Change the implementation of set-returning functions appearing in
> a query's SELECT list (Andres Freund)

Interesting. When I first looked at this thread I figured "oh, that's
always worked, nothing to see here". But you're right, we didn't use
to allow SRFs in subscripts. Still, I'm with David that no new docs
are needed. IMO the former restriction was the surprising thing, and
the current behavior is simply what one would expect from assembling
those parts in that order.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2021-07-12 14:42:55 Re: Undocumented array_val[generate_series(...)] functionality?
Previous Message Jeff Ross 2021-07-12 14:24:50 Re: Removing a subscription that does not exist