pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dean Rasheed <dean.a.rasheed@gmail.com>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: David Rowley <dgrowleyml@gmail.com>
Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Undocumented array_val[generate_series(...)] functionality?
Date: Mon, 12 Jul 2021 10:27:01 -0400
Message-ID: <2947769.1626100021@sss.pgh.pa.us> (raw)
In-Reply-To: <CAEZATCW3kH5kG+G8YFmv-DqjGbTkc-=g2fXKqhEBoCzQCb=9eQ@mail.gmail.com>
References: <CAKFQuwaMq8xwBoJzW_gGVrDj0hvCf2V7Z2bJEZkkNodZnayOVQ@mail.gmail.com>
	<CAApHDvoRcyDFvvt+5Y3uNeuckaNhpLZg6jsBc2T3xWqL5iPAnQ@mail.gmail.com>
	<CAKFQuwYuBGGL90uUCMb3TQB+pSxgvLJVRv_YP5UrUFN_KKj8=A@mail.gmail.com>
	<CAApHDvpWEqS_1OdHLT9X_7YfZuK91mwRFWsmE0LoY4cf-8VJ-A@mail.gmail.com>
	<CAKFQuwY=4BBQ9iMarAk4MFQdZ0u-xXvW=P25aHChX4b7MdXmwA@mail.gmail.com>
	<CAEZATCW3kH5kG+G8YFmv-DqjGbTkc-=g2fXKqhEBoCzQCb=9eQ@mail.gmail.com>

Dean Rasheed <dean.a.rasheed@gmail.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





view thread (10+ messages)  latest in thread

Message-ID: <2947769.1626100021@sss.pgh.pa.us>
Permalink:  ../2947769.1626100021@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2947769.1626100021@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, dean.a.rasheed@gmail.com, david.g.johnston@gmail.com, dgrowleyml@gmail.com
  Subject: Re: Undocumented array_val[generate_series(...)] functionality?
  In-Reply-To: <2947769.1626100021@sss.pgh.pa.us>
  References: <CAKFQuwaMq8xwBoJzW_gGVrDj0hvCf2V7Z2bJEZkkNodZnayOVQ@mail.gmail.com> <CAApHDvoRcyDFvvt+5Y3uNeuckaNhpLZg6jsBc2T3xWqL5iPAnQ@mail.gmail.com> <CAKFQuwYuBGGL90uUCMb3TQB+pSxgvLJVRv_YP5UrUFN_KKj8=A@mail.gmail.com> <CAApHDvpWEqS_1OdHLT9X_7YfZuK91mwRFWsmE0LoY4cf-8VJ-A@mail.gmail.com> <CAKFQuwY=4BBQ9iMarAk4MFQdZ0u-xXvW=P25aHChX4b7MdXmwA@mail.gmail.com> <CAEZATCW3kH5kG+G8YFmv-DqjGbTkc-=g2fXKqhEBoCzQCb=9eQ@mail.gmail.com> <2947769.1626100021@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox