pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Complain if a function-in-FROM returns a set when it shouldn't.
Date: Mon, 08 Mar 2021 23:55:05 +0000
Message-ID: <E1lJPiL-0004JC-Nb@gemulon.postgresql.org> (raw)

Complain if a function-in-FROM returns a set when it shouldn't.

Throw a "function protocol violation" error if a function in FROM
tries to return a set though it wasn't marked proretset.  Although
such cases work at the moment, it doesn't seem like something we
want to guarantee will keep working.  Besides, there are other
negative consequences of not setting the proretset flag, such as
potentially bad plans.

No back-patch, since if there is any third-party code violating
this expectation, people wouldn't appreciate us breaking it in
a minor release.

Discussion: https://postgr.es/m/1636062.1615141782@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d4545dc19b8ea670bf62e06d22b0e4e6fcb45153

Modified Files
--------------
src/backend/executor/execSRF.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)



Message-ID: <E1lJPiL-0004JC-Nb@gemulon.postgresql.org>
Permalink:  ../E1lJPiL-0004JC-Nb@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1lJPiL-0004JC-Nb@gemulon.postgresql.org

 · 

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-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Complain if a function-in-FROM returns a set when it shouldn't.
  In-Reply-To: <E1lJPiL-0004JC-Nb@gemulon.postgresql.org>
  References: <E1lJPiL-0004JC-Nb@gemulon.postgresql.org>

* 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