From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Viliam Ďurina <viliam.durina@gmail.com>
Cc: Thomas Kellerer <shammat@gmx.net>
Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Unexpected zero results
Date: Wed, 23 Mar 2022 18:57:56 -0400
Message-ID: <2886427.1648076276@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwaoqaQcpnuz5PSZAsOr3if1T+PBCz3RtDLZmzWq0YefYw@mail.gmail.com>
References: <CAO=iB8K_AJe-x7gZSCS+ndTAsE2XUj8+i7rP5UHxvUO6cMySBw@mail.gmail.com>
<0910192d-ed0f-e455-c591-c4d59b6172f2@gmx.net>
<CAO=iB8KMQD_66JySPhCPDi5EKoj9ovKF1EdgUdLWkyimUwLT2A@mail.gmail.com>
<CAKFQuwaoqaQcpnuz5PSZAsOr3if1T+PBCz3RtDLZmzWq0YefYw@mail.gmail.com>
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Wed, Mar 23, 2022 at 10:10 AM Viliam Ďurina <viliam.durina@gmail.com>
> wrote:
>> Now I'm surprised that a set-returning function is even allowed in SELECT
>> clause where the values have to be scalar.
> AFAIK the lateral construct, which is required to avoid doing just this, is
> a relatively recent invention for SQL. I infer from that fact that the
> ability to execute a set-returning function in the select clause has always
> been allowed.
I believe that Postgres' handling of that is actually a hangover
from Berkeley's PostQUEL language. Dunno what the SQL standard has
to say on the subject --- but it wouldn't surprise me if they don't
allow it.
regards, tom lane
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, david.g.johnston@gmail.com, viliam.durina@gmail.com, shammat@gmx.net
Subject: Re: Unexpected zero results
In-Reply-To: <2886427.1648076276@sss.pgh.pa.us>
References: <CAO=iB8K_AJe-x7gZSCS+ndTAsE2XUj8+i7rP5UHxvUO6cMySBw@mail.gmail.com> <0910192d-ed0f-e455-c591-c4d59b6172f2@gmx.net> <CAO=iB8KMQD_66JySPhCPDi5EKoj9ovKF1EdgUdLWkyimUwLT2A@mail.gmail.com> <CAKFQuwaoqaQcpnuz5PSZAsOr3if1T+PBCz3RtDLZmzWq0YefYw@mail.gmail.com> <2886427.1648076276@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