pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Gavin Roy <gavinr@aweber.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Regression in PL/PGSQL code using RETURN QUERY with Postgres 14
Date: Thu, 7 Oct 2021 11:54:46 -0700
Message-ID: <af3b6087-881a-8a2e-8061-e96cee6cccc8@aklaver.com> (raw)
In-Reply-To: <CAFVAjJEN65VJY21DgWZXSKu6Q-hHJ67Frz3Opz3ACmP1yxAePQ@mail.gmail.com>
References: <CAFVAjJEN65VJY21DgWZXSKu6Q-hHJ67Frz3Opz3ACmP1yxAePQ@mail.gmail.com>

On 10/7/21 11:38 AM, Gavin Roy wrote:
> Hi All,
> 
> My team was testing against Postgres 14 to ensure we could cleanly 
> upgrade and we ran across a regression in our PL/PGSQL code related to 
> the updates to RETURN QUERY.
> 
> Our code which works in previous versions of Postgres uses UPDATE 
> RETURNING and INSERT RETURNING in combination with RETURN QUERY. It 
> appears that in the parallelism updates, RETURN QUERY now only accepts 
> SELECT queries.

I'm pretty sure folks are going to want to see an example of the code 
and the errors thrown in version 14.

> 
> Was this an intentional change in behavior? We can easily refactor our 
> PL/PGSQL functions to deal with the change, but if it was intentional, 
> perhaps it should be documented.
> 
> Regards,
> 
> Gavin


-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (5+ messages)  latest in thread

Message-ID: <af3b6087-881a-8a2e-8061-e96cee6cccc8@aklaver.com>
Permalink:  ../af3b6087-881a-8a2e-8061-e96cee6cccc8@aklaver.com/
Also on:    postgresql.org/message-id/af3b6087-881a-8a2e-8061-e96cee6cccc8@aklaver.com

 · 

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: adrian.klaver@aklaver.com, gavinr@aweber.com
  Subject: Re: Regression in PL/PGSQL code using RETURN QUERY with Postgres 14
  In-Reply-To: <af3b6087-881a-8a2e-8061-e96cee6cccc8@aklaver.com>
  References: <CAFVAjJEN65VJY21DgWZXSKu6Q-hHJ67Frz3Opz3ACmP1yxAePQ@mail.gmail.com> <af3b6087-881a-8a2e-8061-e96cee6cccc8@aklaver.com>

* 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